From 1677b5a2bc8376e3d3384ac6aa727495e7894627 Mon Sep 17 00:00:00 2001 From: mikemilla Date: Thu, 25 May 2023 12:10:34 -0700 Subject: [PATCH] Bump --- example/ios/Runner/AppDelegate.swift | 21 ++++++++++++++------- example/pubspec.lock | 2 +- ios/Classes/CourierFlutterDelegate.swift | 4 ++-- pubspec.yaml | 2 +- test/courier_flutter_test.dart | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift index 8b15968..deeb757 100644 --- a/example/ios/Runner/AppDelegate.swift +++ b/example/ios/Runner/AppDelegate.swift @@ -4,11 +4,18 @@ import courier_flutter @UIApplicationMain @objc class AppDelegate: CourierFlutterDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } + + override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } + + override func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { + super.application(application, didFailToRegisterForRemoteNotificationsWithError: error) + } + + override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + super.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken) + } + } diff --git a/example/pubspec.lock b/example/pubspec.lock index 2834a6f..5663ab9 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -42,7 +42,7 @@ packages: path: ".." relative: true source: path - version: "1.0.3" + version: "1.0.4" cupertino_icons: dependency: "direct main" description: diff --git a/ios/Classes/CourierFlutterDelegate.swift b/ios/Classes/CourierFlutterDelegate.swift index b11f874..5e79053 100644 --- a/ios/Classes/CourierFlutterDelegate.swift +++ b/ios/Classes/CourierFlutterDelegate.swift @@ -155,11 +155,11 @@ open class CourierFlutterDelegate: FlutterAppDelegate { // MARK: Token Management - public override func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { + open override func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { Courier.log("Unable to register for remote notifications: \(error.localizedDescription)") } - public override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + open override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Task { do { try await Courier.shared.setAPNSToken(deviceToken) diff --git a/pubspec.yaml b/pubspec.yaml index 811bfc5..9d07f3e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: courier_flutter description: The best way to add push notifications to your Flutter app! -version: 1.0.4 +version: 1.0.5 homepage: https://courier.com environment: diff --git a/test/courier_flutter_test.dart b/test/courier_flutter_test.dart index c217375..acc3a8f 100644 --- a/test/courier_flutter_test.dart +++ b/test/courier_flutter_test.dart @@ -16,7 +16,7 @@ class MockCourierFlutterCorePlatform String? _accessToken; String? _apnsToken; String? _fcmToken; - bool _isDebugging = false; + final bool _isDebugging = false; @override Future isDebugging(bool isDebugging) {