Skip to content

Commit 6156046

Browse files
authored
Fix crash on ad fail (#66)
1 parent 4f8a968 commit 6156046

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ pubspec.lock
77

88
build/
99
.idea
10+
example/ios/Flutter/flutter_export_environment.sh

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
## [0.3.2] - 2019/09/11
2+
iOS Interstitial crash fix if `didFailToReceiveAdWithError`
3+
14
## [0.3.1] - 2019/05/31
2-
iOS Banner Crash fix
5+
iOS Banner crash fix
36

47
## [0.3.0] - 2019/05/28
58
Add iOS support!

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1030"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

ios/Classes/AdmobInterstitialPlugin.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ class AdmobIntersitialPluginDelegate: NSObject, GADInterstitialDelegate {
131131
}
132132

133133
func interstitial(_ ad: GADInterstitial, didFailToReceiveAdWithError error: GADRequestError) {
134-
channel.invokeMethod("failedToLoad", arguments: ["errorCode": error])
134+
channel.invokeMethod("failedToLoad", arguments: [
135+
"errorCode": error.code,
136+
"error": error.localizedDescription
137+
])
135138
}
136139

137140
func interstitialDidFail(toPresentScreen ad: GADInterstitial) {

ios/admob_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
Pod::Spec.new do |s|
55
s.name = 'admob_flutter'
6-
s.version = '0.3.1'
6+
s.version = '0.3.2'
77
s.swift_version = '5.0'
88
s.summary = 'Admob plugin that shows banner ads using native platform views.'
99
s.description = <<-DESC

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: admob_flutter
22
description: Admob plugin that shows banner ads using native platform views.
3-
version: 0.3.1
3+
version: 0.3.2
44
author: Youssef Kababe <[email protected]>
55
homepage: https://github.com/YoussefKababe/admob_flutter
66

0 commit comments

Comments
 (0)