当我写@import FirebaseMessaging; 时,它说 -
未找到模块“FirebaseMessaging”
我做了什么 - 起初我只安装了 Firebase/Core 的 pod,但后来我意识到 Firebase/Messaging 也是必要的. 然后我在 pod 文件中写入 pod 'Firebase/Messaging' 并再次安装 pod。
最佳答案
根据documentation,您不需要在最新的Firebase SDK 中单独导入FirebaseMessaging
:
You'll need to add Firebase initialization code to your application. Import the Firebase module and configure a shared instance as shown:
- Import the Firebase module in your UIApplicationDelegate:
@import Firebase;
- Configure a FirebaseApp shared instance, typically in your application's
application:didFinishLaunchingWithOptions:
method:
// Use Firebase library to configure APIs
[FIRApp configure];
关于ios - 无法在 objective-c AppDelegate.h 中导入 FirebaseMessaging,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51279927/