1

Ich versuche, Firebase-Benachrichtigungen auf Cordova App ios hinzufügen, aber ich kann nicht. Dies sind die Schritte, die ich getan habe:firebase Benachrichtigung cordova ios Integration

1-erstellt das Projekt Feuerbasis
2 Kopieren Sie die Konfigurationsdatei Googleservice-info.plist
3-installieren cordova Plugin fcm
4-fügen Sie diesen Code in der Datei

pod init 
: 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-installiert cocoapods diesen Befehl-6 ausgeführt

7-in-Datei PodFile Ich habe diesen Code eingefügt:

pod ’Firebase/Core’ 

pod 'Firebase/Messaging' 

8-installiert pod mit diesem comand:

pod install 

10-öffnen Sie das Projekt mit .xcworkspace Datei
Jetzt Xcode Gib mir diesen Fehler:

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. 

Was ist los?

Antwort

0

hey müssen Sie diese installieren:

cordova plugin add cordova-plugin-cocoapod-support --save 

für mich diese Arbeit.

Verwandte Themen