简体   繁体   English

离子:无法在 ios 应用程序中安装 phonegap-plugin-push

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

I am new with ionic framework.Currently i am working on ionic iOS app.我是离子框架的新手。目前我正在开发离子 iOS 应用程序。 when i install phonegap-plugin-push i am getting error当我安装phonegap-plugin-push时出现错误

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!我已经搜索过了,但还没有找到解决方案!

I also got same kind of problem.我也遇到了同样的问题。 In my case I used sudo ionic platform add ios就我而言,我使用sudo ionic platform add ios

This is worked well while building every plugins but phonegap-plugin-push.这在构建每个插件时都很有效,但 phonegap-plugin-push 除外。

phonegap-plugin-push is keep giving above error [!] You cannot run CocoaPods as root. (CLAide::Help) phonegap-plugin-push 不断出现上述错误[!] You cannot run CocoaPods as root. (CLAide::Help) [!] You cannot run CocoaPods as root. (CLAide::Help)

Then I used ionic platform add ios without sudo This is the actual solution for this.然后我使用ionic platform add ios without sudo这是实际的解决方案。 But in this case It is keep giving me the permission related issue code EACCESS .但在这种情况下,它一直给我与许可相关的问题code EACCESS

Then I used followings step to overcome that one.然后我使用以下步骤来克服那个。

  • sudo chown -R $USER /usr/local/
  • Again added cordoava and ionic再次添加了cordoava和ionic
  • sudo npm install -g cordova
  • sudo npm install -g ionic

Other informations其他信息

  • phonegap-plugin-push version: 1.10.0 phonegap-plugin-push 版本:1.10.0

  • Cordova CLI: 6.5.0科尔多瓦 CLI:6.5.0

  • Ionic CLI Version: 2.2.2离子 CLI 版本:2.2.2

  • Node Version: v7.7.2节点版本:v7.7.2

  • Xocde Version: Xcode 8.2.1 Xocde 版本:Xcode 8.2.1

  • CocoaPods Version: 1.2.0 CocoaPods 版本:1.2.0

Hope this will help.希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM