diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c84676..085c6c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.3.3] - 2019/09/25 +iOS 13.0 fixes + ## [0.3.2] - 2019/09/11 iOS Interstitial crash fix if `didFailToReceiveAdWithError` diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..fd8959e --- /dev/null +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/app/src/main/kotlin/com/shatsy/example/MainActivity.kt b/example/android/app/src/main/kotlin/com/shatsy/example/MainActivity.kt new file mode 100644 index 0000000..324c6a3 --- /dev/null +++ b/example/android/app/src/main/kotlin/com/shatsy/example/MainActivity.kt @@ -0,0 +1,13 @@ +package com.shatsy.example + +import android.os.Bundle + +import io.flutter.app.FlutterActivity +import io.flutter.plugins.GeneratedPluginRegistrant + +class MainActivity: FlutterActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + GeneratedPluginRegistrant.registerWith(this) + } +} diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..fd8959e --- /dev/null +++ b/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index d541d6d..222c051 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -2,14 +2,10 @@ - io.flutter.embedded_views_preview - - LSApplicationCategoryType - - GADApplicationIdentifier - ca-app-pub-3940256099942544~1458002511 CFBundleDevelopmentRegion en + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -20,12 +16,14 @@ admob_flutter_example CFBundlePackageType APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) CFBundleSignature ???? CFBundleVersion $(FLUTTER_BUILD_NUMBER) + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + LSApplicationCategoryType + LSRequiresIPhoneOS UILaunchStoryboardName @@ -47,5 +45,7 @@ UIViewControllerBasedStatusBarAppearance + io.flutter.embedded_views_preview + diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ec9971a..8777a8a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,7 @@ name: admob_flutter_example description: Demonstrates how to use the admob_flutter plugin. publish_to: 'none' +version: 1.0.0+1 environment: sdk: ">=2.0.0-dev.68.0 <3.0.0" diff --git a/ios/Classes/AdmobBanner.swift b/ios/Classes/AdmobBanner.swift index 3fc50c2..6ed1574 100644 --- a/ios/Classes/AdmobBanner.swift +++ b/ios/Classes/AdmobBanner.swift @@ -73,7 +73,7 @@ class AdmobBanner : NSObject, FlutterPlatformView { fileprivate func requestAd() { if let ad = getBannerAdView() { let request = GADRequest() - request.testDevices = [kGADSimulatorID] + GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [kGADSimulatorID as! String] ad.load(request) } } diff --git a/ios/Classes/AdmobInterstitialPlugin.swift b/ios/Classes/AdmobInterstitialPlugin.swift index ce90cc9..c6151d9 100644 --- a/ios/Classes/AdmobInterstitialPlugin.swift +++ b/ios/Classes/AdmobInterstitialPlugin.swift @@ -80,7 +80,7 @@ public class AdmobIntersitialPlugin: NSObject, FlutterPlugin { private func loadInterstantialAd(id: Int, interstantialAdUnitId: String) { let interstantial = getInterstitialAd(id: id, interstantialAdUnitId: interstantialAdUnitId) let request = GADRequest() - request.testDevices = [kGADSimulatorID] + GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [kGADSimulatorID as! String] interstantial.load(request) } diff --git a/ios/Classes/AdmobRewardPlugin.swift b/ios/Classes/AdmobRewardPlugin.swift index ecc50a5..b8e953f 100644 --- a/ios/Classes/AdmobRewardPlugin.swift +++ b/ios/Classes/AdmobRewardPlugin.swift @@ -87,7 +87,7 @@ public class AdmobRewardPlugin: NSObject, FlutterPlugin { private func loadRewardBasedVideoAd(id: Int, rewardBasedVideoAdUnitId: String) { let interstantial = getRewardBasedVideoAd(id: id) let request = GADRequest() - request.testDevices = [kGADSimulatorID] + GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [kGADSimulatorID as! String] interstantial.load(request, withAdUnitID: rewardBasedVideoAdUnitId) } diff --git a/lib/src/admob_event_handler.dart b/lib/src/admob_event_handler.dart index f5cc4e0..c2c2ea5 100644 --- a/lib/src/admob_event_handler.dart +++ b/lib/src/admob_event_handler.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/services.dart'; import 'admob_events.dart'; @@ -6,7 +8,8 @@ export 'admob_events.dart'; abstract class AdmobEventHandler { final Function(AdmobAdEvent, Map) _listener; - AdmobEventHandler(Function(AdmobAdEvent, Map) listener) : _listener = listener; + AdmobEventHandler(Function(AdmobAdEvent, Map) listener) + : _listener = listener; Future handleEvent(MethodCall call) async { switch (call.method) { @@ -14,7 +17,8 @@ abstract class AdmobEventHandler { _listener(AdmobAdEvent.loaded, null); break; case 'failedToLoad': - _listener(AdmobAdEvent.failedToLoad, Map.from(call.arguments)); + _listener(AdmobAdEvent.failedToLoad, + Map.from(call.arguments)); break; case 'clicked': _listener(AdmobAdEvent.clicked, null); @@ -35,7 +39,8 @@ abstract class AdmobEventHandler { _listener(AdmobAdEvent.completed, null); break; case 'rewarded': - _listener(AdmobAdEvent.rewarded, Map.from(call.arguments)); + _listener( + AdmobAdEvent.rewarded, Map.from(call.arguments)); break; case 'started': _listener(AdmobAdEvent.started, null); diff --git a/lib/src/admob_interstitial.dart b/lib/src/admob_interstitial.dart index 3e102f6..6ba012c 100644 --- a/lib/src/admob_interstitial.dart +++ b/lib/src/admob_interstitial.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/services.dart'; import 'package:meta/meta.dart'; import 'admob_event_handler.dart'; diff --git a/lib/src/admob_reward.dart b/lib/src/admob_reward.dart index 7f84abd..79ad529 100644 --- a/lib/src/admob_reward.dart +++ b/lib/src/admob_reward.dart @@ -1,3 +1,5 @@ +import 'dart:async'; + import 'package:flutter/services.dart'; import 'package:meta/meta.dart'; import 'admob_event_handler.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 12a61ec..d7b2dec 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: admob_flutter description: Admob plugin that shows banner ads using native platform views. -version: 0.3.2 +version: 0.3.3 author: Youssef Kababe homepage: https://github.com/YoussefKababe/admob_flutter environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: ">=2.1.0 <3.0.0" dependencies: flutter: