2017-06-02 1 views
2

Ich habe ein neues Projekt erstellt und das OneSignal Plugin installiert.Ionic 3 Projekt kann nach der Installation des OneSignal Plugins nicht für ios erstellt werden

sudo ionische cordova Plugin hinzufügen onesignal-cordova-Plugin

sudo npm --save @ ionische-native/onesignal


Danach installiere ich für Android gebaut war in Ordnung, noch habe ich für iOS gebaut.

sudo ionische cordova ios bauen


Es gab mir eine Nachricht wie diese ->

Lolzzs-MacBook-Pro:myOnesignal lolzzlolzz$ sudo ionic cordova build ios 
> cordova platform add --save ios 
✖ Running command - failed! 
[ERROR] An error occurred while running cordova platform add --save ios (exit code 1): 

     Using cordova-fetch for [email protected]~4.4.0 
     Adding ios project... 
     Creating Cordova project for the iOS platform: 
       Path: platforms/ios 
       Package: io.ionic.starter 
       Name: MyApp 
     iOS project created with [email protected] 
     Installing "cordova-plugin-console" for ios 
     Installing "cordova-plugin-device" for ios 
     Installing "cordova-plugin-splashscreen" for ios 
     Installing "cordova-plugin-statusbar" for ios 
     Installing "cordova-plugin-whitelist" for ios 
     Installing "ionic-plugin-keyboard" for ios 
     Installing "onesignal-cordova-plugin" for ios 
     Failed to install 'onesignal-cordova-plugin': undefined 
     Error: /usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.1/lib/claide/command.rb:439:in 
`help!': [!] You cannot run CocoaPods as root. (CLAide::Help) 

     Usage: 

      $ pod COMMAND 

       CocoaPods, the Cocoa library package manager. 

     Commands: 
+ cache  Manipulate the CocoaPods cache 
      + env  Display pod environment 
      + init  Generate a Podfile for the current directory 
      + install Install project dependencies according to versions from a 
         Podfile.lock 
      + ipc  Inter-process communication 
      + lib  Develop pods 
      + list  List pods 
      + outdated Show outdated project dependencies 
      + repo  Manage spec-repositories 
      + setup  Setup the CocoaPods environment 
      + spec  Manage pod specs 
      + update  Update outdated project dependencies and create new Podfile.lock 

     Options: 

      --silent  Show nothing 
      --version Show the version of the tool 
      --verbose Show more debugging information 
      --no-ansi Show output without ANSI codes 
      --help  Show help banner of specified command 
       from /usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1/lib/cocoapods/comma 
nd.rb:47:in `run' 
       from /usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1/bin/pod:55:in `<top 
(required)>' 
       from /usr/local/bin/pod:22:in `load' 
       from /usr/local/bin/pod:22:in `<main>' 
+0

Warum bauen Sie mit sudo? Ich denke, der Fehler ist in diesem Fall ziemlich klar: Sie können CocoaPods nicht als root – tier1

+0

Sie sollten Sudo nicht verwenden, um Plugins zu installieren – tier1

+0

@ Tier1 Ich benutze Mac und ich legte Sudo zu vermeiden Berechtigungen verweigert, aber ich werde es wieder ohne versuchen sudo und danke ich werde wieder testen :-D –

Antwort

1

nach langer Zeit versucht, mein Projekt mit dem exakt gleichen bauen Fehler mit oneSignal

Ich sah eine Anweisung, um zur Plattform/iosgehenund laufen:

sudo gem install cocoapods

und

pod install --repo-update

und arbeitete

Verwandte Themen