我在重新安装 iOS 应用程序时发现了一个新问题。在重新安装应用程序之前工作正常。在重新安装之前,我更新了 cocoa sdk repo,并将 Firebase 和 FirebaseDatabase 版本从 3.15.0 更新到 4.0.0 版。
下面是崩溃日志:
-[FIRA_AppDelegate-1495465837867 messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x174661b40 2017-05-22 23:10:58.550969+0800 moodfriends[1716:245390] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FIRA_AppDelegate-1495465837867 messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x174661b40'
最佳答案
刚找到解决方案。
改变了
[FIRMessaging messaging].remoteMessageDelegate = self;
到
[FIRMessaging messaging].delegate = self;
remoteMessageDelegate 似乎随着版本更新而被弃用,FIRMessagingDelegate 应该委托(delegate)函数。
swift 3:
Messaging.messaging().delegate = self
关于ios - [FIRA_AppDelegate- 消息传递 :didRefreshRegistrationToken:]: unrecognized selector sent to instance - firebase crash issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44116626/