簡體   English   中英

Flutter [firebase_messaging] IOS 構建錯誤

[英]Flutter [firebase_messaging] IOS Build Error

我對 Firebase 消息( https://pub.dev/packages/firebase_messaging )有疑問。 將此添加到項目后,我無法在 IOS 中構建。

我試過了:

flutter clean
flutter precache    
pod deintegrate
pod setup
pod install

嘗試:刪除 Podfile.lock

編輯/刪除 WorkspaceSettings.xcsettings

將構建系統更改為舊版

我在實際項目中遇到了同樣的問題。 我創建了空白項目,構建 ios 並在模擬器上運行。 在我添加 FirebaseMessaging 后得到這個構建錯誤。 嘗試了我發短信的方法,但對我不起作用。 錯誤:

In file included from /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:9:
    /Users/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:81:10: warning: "FirebaseAnalytics.framework is not
    included in your target. Please add the FirebaseAnalytics dependency to your project to ensure Messaging works as intended." [-W#warnings]
            #warning "FirebaseAnalytics.framework is not included in your target. Please add the \
             ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:190:43: error: expected a
    type
    - (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
                                              ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:274: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
    @interface UIUserNotificationSettings : NSObject
               ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:285:53: error: nullability
    specifier 'nonnull' conflicts with existing specifier 'nullable'
        didReceiveRegistrationToken:(nonnull NSString *)fcmToken {
                                                        ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:290:24: error: expected a
    type
        didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {
                           ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:117: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
                                   ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:119: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
                                   ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:122: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
                                   ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:125: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
                                   ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:128: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
    @interface UIUserNotificationSettings : NSObject
               ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:129: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
    @interface UIUserNotificationSettings : NSObject
               ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:130: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/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/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:136:30: error: property
    'shouldEstablishDirectChannel' not found on object of type 'FIRMessaging *'
        [FIRMessaging messaging].shouldEstablishDirectChannel = true;
                                 ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:155: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
    /Users/mac/Desktop/Flutter Apps/iyifiyatt/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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
    ramework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
    on.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
    expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:156: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
    /Users/mac/Desktop/Flutter Apps/iyifiyatt/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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
    ramework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
    on.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
    expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:156: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
    /Users/mac/Desktop/Flutter Apps/iyifiyatt/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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
    ramework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
    on.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
    expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:166: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
    /Users/mac/Desktop/Flutter Apps/iyifiyatt/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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
    ramework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
    on.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
    expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:166: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Headers/Public/Firebase/Firebase.h:74:
    /Users/mac/Desktop/Flutter Apps/iyifiyatt/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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/Foundation.f
    ramework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/CoreFoundati
    on.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/usr/include/sys/cdefs.h:200:48: note:
    expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:191:52: error: property
    'appData' not found on object of type '__strong id'
      [self didReceiveRemoteNotification:remoteMessage.appData];
                                                       ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:273:1: warning: implementing
    deprecated method [-Wdeprecated-implementations]
    - (void)application:(UIApplication *)application
    ^
    In module 'Flutter' imported from
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.h:5:
    /Users/mac/Downloads/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-armv7_arm64/Flutter.framework/Headers/FlutterPlug
    in.h:74:1: note: method 'application:didRegisterUserNotificationSettings:' declared here
    - (void)application:(UIApplication*)application
    ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:276: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
                                   ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:277: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
                                   ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:278: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/mac/Desktop/Flutter Apps/iyifiyatt/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk/System/Library/Frameworks/UIKit.framew
    ork/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
    typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
                                   ^
    /Users/mac/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.3/ios/Classes/FLTFirebaseMessagingPlugin.m:291:63: error: property
    'appData' not found on object of type '__strong id'
      [_channel invokeMethod:@"onMessage" arguments:remoteMessage.appData];
                                                                  ^
    18 warnings and 6 errors generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Encountered error while building for device.

解決了!

它通過運行以下命令解決:

rm -rf Pods  
rm -rf Podfile.lock  
rm -rf ~/.pub-cache/hosted/pub.dartlang.org/  
flutter clean  
flutter pub get  
pod repo update  
flutter build ios

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM