firebase / flutterfire

šŸ”„ A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

šŸ› [firebase_messaging] Xcode build failed because of deprecated codes in older versions of iOS #5192

Closed ZahidTekbas closed 3 years ago

ZahidTekbas commented 3 years ago

Bug report

Describe the bug

FirebaseMessaging plugin uses old & deprecated libraries in iOS thus I cannot build my Flutter app to iOS. As you know, cloud_firestore requires min iOS 10.0 and new Xcode versions require at least iOS 9.0 but FirebaseMessaging plugin requires min iOS 8.0.

Steps to reproduce

Steps to reproduce the behavior:

  1. Add firebase dependencies correctly
  2. Do flutter run

Expected behavior

App works with no error on iOS.


Flutter doctor

[āœ“] Flutter (Channel stable, 1.22.6, on macOS 11.2 20D64 darwin-x64, locale en-TR)
    ā€¢ Flutter version 1.22.6 at /Users/zahidtekbas/flutter
    ā€¢ Framework revision 9b2d32b605 (6 weeks ago), 2021-01-22 14:36:39 -0800
    ā€¢ Engine revision 2f0af37152
    ā€¢ Dart version 2.10.5

[āœ“] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    ā€¢ Android SDK at /Users/zahidtekbas/Library/Android/sdk
    ā€¢ Platform android-30, build-tools 29.0.3
    ā€¢ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    ā€¢ Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    ā€¢ All Android licenses accepted.

[āœ“] Xcode - develop for iOS and macOS (Xcode 12.3)
    ā€¢ Xcode at /Applications/Xcode.app/Contents/Developer
    ā€¢ Xcode 12.3, Build version 12C33
    ā€¢ CocoaPods version 1.10.0

[āœ“] Android Studio (version 3.6)
    ā€¢ Android Studio at /Applications/Android Studio.app/Contents
    ā€¢ Flutter plugin version 44.0.2
    ā€¢ Dart plugin version 192.7761
    ā€¢ Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[āœ“] IntelliJ IDEA Ultimate Edition (version 2020.3.2)
    ā€¢ IntelliJ at /Applications/IntelliJ IDEA.app
    ā€¢ Flutter plugin installed
    ā€¢ Dart plugin version 203.6912

[āœ“] VS Code (version 1.53.2)
    ā€¢ VS Code at /Applications/Visual Studio Code.app/Contents
    ā€¢ Flutter extension version 3.4.1

[āœ“] Connected device (1 available)
    ā€¢ iPhone 12 Pro Max (mobile) ā€¢ 943E0837-6EB7-45F6-B9F0-EC00160B2CDE ā€¢ ios ā€¢ com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)

ā€¢ No issues found!

Flutter run logs

Click To Expand ``` /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:195:43: error: expected a type - (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:291:42: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings { ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:302:53: error: nullability specifier 'nonnull' conflicts with existing specifier 'nullable' didReceiveRegistrationToken:(nonnull NSString *)fcmToken { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:307:24: error: expected a type didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:122:7: warning: 'UIUserNotificationType' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] UIUserNotificationType notificationTypes = 0; ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:124:30: warning: 'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeSound; ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:127:30: warning: 'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeAlert; ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:130:30: warning: 'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] notificationTypes |= UIUserNotificationTypeBadge; ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:133:7: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] UIUserNotificationSettings *settings = ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:134:39: warning: 'UIUserNotificationSettings' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations] [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil]; ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here @interface UIUserNotificationSettings : NSObject ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:135:42: warning: 'registerUserNotificationSettings:' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:] [-Wdeprecated-declarations] [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:250:1: note: 'registerUserNotificationSettings:' has been explicitly marked deprecated here - (void)registerUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings API_DEPRECATED("Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]", ios(8.0, 10.0)) API_UNAVAILABLE(tvos); ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:141:30: error: property 'shouldEstablishDirectChannel' not found on object of type 'FIRMessaging *' [FIRMessaging messaging].shouldEstablishDirectChannel = true; ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:160:21: warning: 'FIRInstanceID' is deprecated: FIRInstanceID is deprecated, please use FIRInstallations for installation identifier handling and use FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations] [[FIRInstanceID instanceID] ^ In module 'FirebaseInstanceID' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Headers/Public/Firebase/Firebase.h:74: /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:190:1: note: 'FIRInstanceID' has been explicitly marked deprecated here __deprecated_msg("FIRInstanceID is deprecated, please use FIRInstallations for installation " ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8: In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:161:33: warning: 'FIRInstanceIDResult' is deprecated: FIRInstanceIDResult is deprecated, please use FIRInstallations for app instance identifier handling and use FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations] instanceIDWithHandler:^(FIRInstanceIDResult *_Nullable instanceIDResult, ^ In module 'FirebaseInstanceID' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Headers/Public/Firebase/Firebase.h:74: /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:153:1: note: 'FIRInstanceIDResult' has been explicitly marked deprecated here __deprecated_msg("FIRInstanceIDResult is deprecated, please use FIRInstallations " ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8: In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:161:9: warning: 'instanceIDWithHandler:' is deprecated: Use `Installations.installationID(completion:)` to get the app instance identifier instead. Use `Messaging.token(completion:)` to get FCM registration token instead. [-Wdeprecated-declarations] instanceIDWithHandler:^(FIRInstanceIDResult *_Nullable instanceIDResult, ^ In module 'FirebaseInstanceID' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Headers/Public/Firebase/Firebase.h:74: /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:215:5: note: 'instanceIDWithHandler:' has been explicitly marked deprecated here __deprecated_msg("Use `Installations.installationID(completion:)` to get the app instance " ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8: In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:171:21: warning: 'FIRInstanceID' is deprecated: FIRInstanceID is deprecated, please use FIRInstallations for installation identifier handling and use FIRMessaging for FCM registration token handling. [-Wdeprecated-declarations] [[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error) { ^ In module 'FirebaseInstanceID' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Headers/Public/Firebase/Firebase.h:74: /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:190:1: note: 'FIRInstanceID' has been explicitly marked deprecated here __deprecated_msg("FIRInstanceID is deprecated, please use FIRInstallations for installation " ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8: In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:171:33: warning: 'deleteIDWithHandler:' is deprecated: Use `Installations.delete(completion:)` instead. Also check `Messaging.deleteData(completion:)`if you want to delete FCM registration token. [-Wdeprecated-declarations] [[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error) { ^ In module 'FirebaseInstanceID' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Headers/Public/Firebase/Firebase.h:74: /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Public/FIRInstanceID.h:321:33: note: 'deleteIDWithHandler:' has been explicitly marked deprecated here __deprecated_msg("Use `Installations.delete(completion:)` instead. " ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8: In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/usr/include/sys/cdefs.h:200:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:196:52: error: property 'appData' not found on object of type '__strong id' [self didReceiveRemoteNotification:remoteMessage.appData]; ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:290:1: warning: implementing deprecated method [-Wdeprecated-implementations] - (void)application:(UIApplication *)application ^ In module 'Flutter' imported from /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.h:5: /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:74:1: note: method 'application:didRegisterUserNotificationSettings:' declared here - (void)application:(UIApplication*)application ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:293:70: warning: 'UIUserNotificationTypeSound' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] @"sound" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeSound], ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:294:70: warning: 'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] @"badge" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeBadge], ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:295:70: warning: 'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations] @"alert" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeAlert], ^ In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/sk_stable/ios/Pods/Target Support Files/firebase_messaging/firebase_messaging-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) { ^ /Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin.m:308:63: error: property 'appData' not found on object of type '__strong id' [_channel invokeMethod:@"onMessage" arguments:remoteMessage.appData]; 17 warnings and 6 errors generated. note: Using new build system note: Building targets in parallel note: Planning build note: Using build description from disk ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.10.5 Flutter SDK 1.22.6 sk_stable 1.0.0+1 dependencies: - animated_splash_screen 1.0.1+2 [flutter page_transition] - assets_audio_player 2.0.14 [flutter rxdart uuid http path_provider assets_audio_player_web] - auto_size_text 2.1.0 [flutter] - cached_network_image 2.5.0 [flutter flutter_cache_manager octo_image] - carousel_slider 3.0.0 [flutter] - cloud_firestore 0.16.0+1 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web] - connectivity 2.0.2 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web] - countup 0.1.3 [flutter] - cupertino_icons 1.0.0 - device_info 1.0.0 [flutter device_info_platform_interface] - firebase_admob 0.11.0+1 [meta flutter firebase_core] - firebase_auth 0.20.1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter] - firebase_core 0.7.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - firebase_in_app_messaging 0.3.0+1 [meta flutter firebase_core] - firebase_messaging 6.0.16 [meta platform flutter] - flip_panel 1.0.1 [flutter] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_inappwebview 4.0.0+4 [flutter uuid mime] - flutter_local_notifications 4.0.1+1 [flutter flutter_local_notifications_platform_interface platform timezone] - flutter_picker 1.1.5 [flutter] - flutter_secure_storage 3.3.5 [meta flutter] - flutter_snake_navigationbar 0.4.4 [flutter] - flutter_staggered_animations 0.1.2 [flutter] - fluttertoast 7.1.8 [flutter flutter_web_plugins] - font_awesome_flutter 8.11.0 [flutter] - google_fonts 1.1.2 [flutter http path_provider crypto] - gradient_app_bar 0.1.3 [flutter] - hive 1.4.4+1 [meta crypto] - hive_flutter 0.3.1 [flutter hive path_provider path] - http 0.12.2 [http_parser path pedantic] - image_picker 0.6.7+22 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - intl 0.16.1 [path] - page_transition 1.1.7+2 [flutter] - path_provider 1.6.27 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - pin_code_fields 6.1.0 [flutter] - purchases_flutter 2.0.3 [flutter] - qr_code_scanner 0.3.5 [flutter] - shared_preferences 0.5.12+4 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows] - syncfusion_flutter_barcodes 18.4.46 [flutter syncfusion_flutter_core] - url_launcher 5.7.10 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows] dev dependencies: - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] transitive dependencies: - archive 2.0.13 [crypto args path] - args 1.6.0 - assets_audio_player_web 2.0.14 [flutter flutter_web_plugins] - async 2.5.0-nullsafety.1 [collection] - boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner] - characters 1.1.0-nullsafety.3 - charcode 1.2.0-nullsafety.1 - clock 1.1.0-nullsafety.1 - cloud_firestore_platform_interface 3.0.2 [flutter meta collection firebase_core plugin_platform_interface] - cloud_firestore_web 0.3.0+2 [flutter flutter_web_plugins http_parser meta firebase_core firebase_core_web cloud_firestore_platform_interface js] - collection 1.15.0-nullsafety.3 - connectivity_for_web 0.3.1+4 [connectivity_platform_interface flutter_web_plugins flutter] - connectivity_macos 0.1.0+7 [flutter] - connectivity_platform_interface 1.0.6 [flutter meta plugin_platform_interface] - convert 2.1.1 [charcode typed_data] - crypto 2.1.5 [collection convert typed_data] - device_info_platform_interface 1.0.1 [flutter meta plugin_platform_interface] - fake_async 1.2.0-nullsafety.1 [clock collection] - ffi 0.1.3 - file 5.2.1 [intl meta path] - firebase_auth_platform_interface 3.1.0 [flutter meta firebase_core plugin_platform_interface] - firebase_auth_web 0.3.3 [flutter flutter_web_plugins meta http_parser intl firebase_core firebase_core_web firebase_auth_platform_interface js] - firebase_core_platform_interface 3.0.1 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.1+3 [firebase_core_platform_interface flutter flutter_web_plugins meta js] - flutter_blurhash 0.5.0 [flutter meta] - flutter_cache_manager 2.1.1 [flutter path_provider uuid http path sqflite pedantic clock file rxdart image] - flutter_local_notifications_platform_interface 2.0.0+1 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 1.0.11 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - image 2.1.19 [archive xml meta] - image_picker_platform_interface 1.1.6 [flutter meta http plugin_platform_interface] - js 0.6.2 - matcher 0.12.10-nullsafety.1 [stack_trace] - meta 1.3.0-nullsafety.3 - mime 0.9.7 - octo_image 0.3.0 [flutter flutter_blurhash] - path 1.8.0-nullsafety.1 - path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+8 [flutter] - path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface] - path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.9.2 [meta] - petitparser 3.1.0 [meta] - platform 2.2.1 - plugin_platform_interface 1.0.3 [meta] - process 3.0.13 [file intl meta path platform] - quiver 2.1.5 [matcher meta] - rxdart 0.25.0 - shared_preferences_linux 0.0.2+4 [file flutter meta path path_provider_linux shared_preferences_platform_interface] - shared_preferences_macos 0.0.1+11 [shared_preferences_platform_interface flutter] - shared_preferences_platform_interface 1.0.4 [meta flutter] - shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta] - shared_preferences_windows 0.0.2+3 [shared_preferences_platform_interface flutter file meta path path_provider_platform_interface path_provider_windows] - sky_engine 0.0.99 - source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph] - sqflite 1.3.2+3 [flutter sqflite_common path] - sqflite_common 1.0.3+1 [synchronized path meta] - stack_trace 1.10.0-nullsafety.1 [path] - stream_channel 2.1.0-nullsafety.1 [async] - string_scanner 1.1.0-nullsafety.1 [charcode source_span] - syncfusion_flutter_core 18.4.46 [flutter] - synchronized 2.2.0+2 - term_glyph 1.2.0-nullsafety.1 - test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher] - timezone 0.6.1 [path] - typed_data 1.3.0-nullsafety.3 [collection] - url_launcher_linux 0.0.1+4 [flutter] - url_launcher_macos 0.0.1+9 [flutter] - url_launcher_platform_interface 1.0.9 [flutter meta plugin_platform_interface] - url_launcher_web 0.1.5+3 [url_launcher_platform_interface flutter flutter_web_plugins meta] - url_launcher_windows 0.0.1+3 [flutter] - uuid 2.2.2 [crypto convert] - vector_math 2.1.0-nullsafety.3 - win32 1.7.4+1 [ffi] - xdg_directories 0.1.2 [meta path process] - xml 4.5.1 [collection convert meta petitparser] ```

markusaksli-nc commented 3 years ago

Having a lower minimum iOS deployment target does not block you from using a higher target and all of the latest firebase plugins have a minimum target of 10.0

You can use the latest non-nullsafety version firebase_messaging: ^8.0.0-dev.14 or the latest firebase_messaging: ^9.0.0

Closing since there is no issue here