Skip to content

Commit

Permalink
Fix crash on ad fail (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcgill88 authored Sep 14, 2019
1 parent 4f8a968 commit 6156046
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pubspec.lock

build/
.idea
example/ios/Flutter/flutter_export_environment.sh
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [0.3.2] - 2019/09/11
iOS Interstitial crash fix if `didFailToReceiveAdWithError`

## [0.3.1] - 2019/05/31
iOS Banner Crash fix
iOS Banner crash fix

## [0.3.0] - 2019/05/28
Add iOS support!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1030"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
5 changes: 4 additions & 1 deletion ios/Classes/AdmobInterstitialPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ class AdmobIntersitialPluginDelegate: NSObject, GADInterstitialDelegate {
}

func interstitial(_ ad: GADInterstitial, didFailToReceiveAdWithError error: GADRequestError) {
channel.invokeMethod("failedToLoad", arguments: ["errorCode": error])
channel.invokeMethod("failedToLoad", arguments: [
"errorCode": error.code,
"error": error.localizedDescription
])
}

func interstitialDidFail(toPresentScreen ad: GADInterstitial) {
Expand Down
2 changes: 1 addition & 1 deletion ios/admob_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'admob_flutter'
s.version = '0.3.1'
s.version = '0.3.2'
s.swift_version = '5.0'
s.summary = 'Admob plugin that shows banner ads using native platform views.'
s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: admob_flutter
description: Admob plugin that shows banner ads using native platform views.
version: 0.3.1
version: 0.3.2
author: Youssef Kababe <youssef.kbe@gmail.com>
homepage: https://github.com/YoussefKababe/admob_flutter

Expand Down

0 comments on commit 6156046

Please sign in to comment.