IONIC:无法在ios应用程序中安装phonegap-plugin-push [英] IONIC:Unable to install phonegap-plugin-push in ios app
问题描述
我是离子框架的新手。目前我正在开发离子iOS应用程序。当我安装 phonegap-plugin-push
我收到错误
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!
推荐答案
我也有同样的问题。在我的情况下,我使用 sudo ionic platform add ios
I also got same kind of problem. In my case I used sudo ionic platform add ios
这在构建每个插件时运行良好但是phonegap-plugin -push。
This is worked well while building every plugins but phonegap-plugin-push.
phonegap-plugin-push继续给出以上错误 [!]你不能以root身份运行CocoaPods。 (CLAide :: Help)
phonegap-plugin-push is keep giving above error [!] You cannot run CocoaPods as root. (CLAide::Help)
然后我使用离子平台添加ios
而不用 sudo
这是实际的解决方案。但在这种情况下,它一直给我许可相关问题代码EACCESS
。
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 /
- 再次添加了cordoava和离子
-
sudo npm install -g cordova
-
sudo npm install -g ionic
sudo chown -R $USER /usr/local/
- Again added cordoava and ionic
sudo npm install -g cordova
sudo npm install -g ionic
其他信息
-
phonegap-plugin-push version:1.10.0
phonegap-plugin-push version: 1.10.0
Cordova CLI:6.5.0
Cordova CLI: 6.5.0
Ionic CLI版本:2.2.2
Ionic CLI Version: 2.2.2
节点版本:v7.7.2
Node Version: v7.7.2
Xocde版本:Xcode 8.2.1
Xocde Version: Xcode 8.2.1
CocoaPods版本:1.2.0
CocoaPods Version: 1.2.0
希望这会有所帮助。
这篇关于IONIC:无法在ios应用程序中安装phonegap-plugin-push的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!