简体   繁体   中英

Errors building & emulating iOS with Ionic 2 App

I can't seem to be able to build or emulate in iOS. Xcode is up to date.

This is what I've tried so far:

  1. reinstalling npm
  2. ionic hooks add
  3. sudo remove ios
  4. sudo add ios (got errors when trying to emulate and build)
  5. sudo remove ios
  6. Adding ios without sudo (still errors trying to emulate and build)
  7. npm install -g ios-sim
  8. chown -R username .config/, files belong to me or root

It says iOS platform isn't installed when it definetly is.

I also don't understand how to unlink '/Users/sh/Desktop/PT/www/build/app.html'?

The screenshot below is for emulate but I get the exact same errors for build as well.

在此处输入图片说明

This fixed EACCES error:

sudo chown -R username /Users/username/desktop/folder

This allowed it to build and emulate correctly by installing again:

sudo npm install -g cordova 

However it is not coming up correctly in the emulator but that wasn't the scope of this particular question. The emulator does launch from the command line now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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