Ionic - Add/Remove phonegap-push-plugin - CocoaPods was not found

前端 未结 3 1181
感动是毒
感动是毒 2021-02-01 03:05

I\'m writing an Ionic app but I\'m getting so many issues. One issue in particular is that when I try to add the phonegap-push-plugin using the command

sudo ioni         


        
3条回答
  •  再見小時候
    2021-02-01 03:29

    To install push you must first install cocoapods. Follow these steps on your terminal in the Ionic project directory.

    First remove what you tried to install

    ionic cordova plugin remove phonegap-plugin-push
    

    Next install cocoapods

    sudo gem install cocoapods
    

    Then you need to sync the cocoapods repo

    pod setup
    

    This may take a while

    Finally install push

    ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
    

提交回复
热议问题