小编Bar*_*gor的帖子

Flutter [firebase_messaging] IOS 构建错误

我在使用 Firebase Messaging ( https://pub.dev/packages/firebase_messaging )时遇到问题。将其添加到项目后,我无法在 IOS 中构建。

我试过:

flutter clean
flutter precache    
pod deintegrate
pod setup
pod install
Run Code Online (Sandbox Code Playgroud)

尝试:删除 Podfile.lock

编辑/删除 WorkspaceSettings.xcsettings

将构建系统更改为 Legacy

我在实际项目中也遇到同样的问题。我创建了空白项目,构建 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 …
Run Code Online (Sandbox Code Playgroud)

ios firebase swift flutter firebase-cloud-messaging

5
推荐指数
1
解决办法
3483
查看次数

标签 统计

firebase ×1

firebase-cloud-messaging ×1

flutter ×1

ios ×1

swift ×1