IONIC:Unable to install phonegap-plugin-push in ios app

余生长醉 提交于 2020-01-05 08:55:21

问题


I am new with ionic framework.Currently i am working on ionic iOS app. when i install phonegap-plugin-push i am getting error

Failed to install 'phonegap-plugin-push':undefined  Error: /Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)

i have searched it but no solution found yet!


回答1:


I also got same kind of problem. In my case I used sudo ionic platform add ios

This is worked well while building every plugins but phonegap-plugin-push.

phonegap-plugin-push is keep giving above error [!] You cannot run CocoaPods as root. (CLAide::Help)

Then I used ionic platform add ios without sudo This is the actual solution for this. But in this case It is keep giving me the permission related issue code EACCESS.

Then I used followings step to overcome that one.

  • sudo chown -R $USER /usr/local/
  • Again added cordoava and ionic
  • sudo npm install -g cordova
  • sudo npm install -g ionic

Other informations

  • phonegap-plugin-push version: 1.10.0

  • Cordova CLI: 6.5.0

  • Ionic CLI Version: 2.2.2

  • Node Version: v7.7.2

  • Xocde Version: Xcode 8.2.1

  • CocoaPods Version: 1.2.0

Hope this will help.



来源:https://stackoverflow.com/questions/42665360/ionicunable-to-install-phonegap-plugin-push-in-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!