I found a new issue when I reinstalled the iOS app. Before reinstalling the app worked fine. Before reinstalling I updated cocoa sdk repo and it updated Firebase and FirebaseDatabase version from 3.15.0 to version 4.0.0.
Here is the crash log below:
-[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'
Just found the solution.
Changed
[FIRMessaging messaging].remoteMessageDelegate = self;
to
[FIRMessaging messaging].delegate = self;
It seems remoteMessageDelegate is deprecated with the version update and should FIRMessagingDelegate delegate functions.
Swift 3:
Messaging.messaging().delegate = self
the crash occurred because either the class has no declaration of method messaging:didRefreshRegistrationToken:
or you didn't have set delegate for Firebase Message
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With