Open manel00 opened 3 years ago
https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/commit/be75cce2930b4a9af61df7df85db249dea705f9a maybe this can be the solution? how to apply it? thank you
Hi Manel. change "didReceiveRegistrationToken:(nonnull NSString )deviceToken" to "didReceiveRegistrationToken:(NSString )deviceToken" in the library source ios AppDelegate+FCMPlugin.m.
i had the same issue and remove nonnull fixed my issue in xcode library source ios AppDelegate+FCMPlugin.m file
Describe the bug Once build failed on Xcode (made first on VSCode), it gives this error and 4 warnings. Using Ionic 5, works perfectly on Android, just need to fix this error for iOS, thank you so much To Reproduce Steps to reproduce the behavior: Existing project working perfectly on Android, making build for the first time for iOS
- (void)messaging:(nonnull FIRMessaging *)messaging didReceiveRegistrationToken:(nonnull NSString *)deviceToken { NSLog(@"Device FCM Token: %@", deviceToken); if(deviceToken == nil) { fcmToken = nil; [FCMPlugin.fcmPlugin notifyFCMTokenRefresh:nil]; return; } // Notify about received token. NSDictionary *dataDict = [NSDictionary dictionaryWithObject:deviceToken forKey:@"token"]; [[NSNotificationCenter defaultCenter] postNotificationName:@"FCMToken" object:nil userInfo:dataDict]; fcmToken = deviceToken; [FCMPlugin.fcmPlugin notifyFCMTokenRefresh:deviceToken]; [self connectToFcm]; }
Expected behavior Should compile (I think so) Screenshots
Environment (please complete the following information):
Package.json
ERROR in Terminal