Hi all,
I'm trying to add firebase notifications on cordova app ios but i can't. This are the steps i've done:
1-created the firebase project
2-copy the configuration file Googleservice-info.plist
3-install cordova plugin fcm
4-add this code in file index.js
window.FirebasePlugin.grantPermission();
FCMPlugin.onNotification(function(data){
if(data.wasTapped){
//Notification was received on device tray and tapped by the user.
console.log( JSON.stringify(data) );
}else{
//Notification was received in foreground. Maybe the user needs to be notified.
console.log( JSON.stringify(data) );
}
});
FCMPlugin.subscribeToTopic(topicSub);5-installed cocoapods
6-executed this command:
pod init7-in file PodFile i've inserted this code:
pod ’Firebase/Core’
pod 'Firebase/Messaging'8-installed pod with this comand:
pod install10-open the project with .xcworkspace file
Now xcode return me this errors:
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.What's wrong?