简体   繁体   中英

ionic cordova run works with ionic 1 but not with ionic 3

I've been using ionic 1 since a long time now but I'm shifting to ionic 3

To run ionic 1 project I've been using ionic cordova run ios --livereload

But when I create a new ionic 3 project using ionic start ionic3-test super and then run ionic cordova run ios --livereload I get this error.

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/applications/mamp/htdocs/test/platforms/ios/cordova/build-debug.xcconfig,-workspace,test.xcworkspace,-scheme,test,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 6s Plus,build,CONFIGURATION_BUILD_DIR=/applications/mamp/htdocs/test/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/applications/mamp/htdocs/test/platforms/ios/build/sharedpch

From many similar questions and issues on Git Hub and StackOverflow that suggest plugin issue but the problem here is that it's a new project of type super it must not be due to some conflict in plugins as I've not added anything.

Firstly check whether do you have Available ios devices and Available ios virtual devices using below CLI .

cordova run ios --list

After that run below CLI if you need to run it on emulator .

Note: You need to choose one of an available emulator for you.

ionic cordova emulate ios --target="iPhone-X, 11.1"

There have been several issues but the recent one I was able to use to fix it was to remove cordova-plugin-ionic-webview using the command ionic cordova plugin remove cordova-plugin-ionic-webview .

I was able to go through my older projects which were working fine and I found that this plugin is not present there so I removed it and they started working.I think the error might be due to my old XCODE version which is 7.0 so upgrading it might fix the issue.

I got this error in two conditions:

  1. Some plugin installation stuff, not really sure what happened, try removing your plugin and platform folders and reinstall it all anew
  2. Signing for project was invalid

(I am pretty sure it's signings as it was triggered for me more times)

Sign your app in XCode(at least i'm doing so, not really sure how to do it through ionic), also don't worry about developer account, apple allows to sign using your appleID for development

Also try follow docs for iOS

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