Cordova builds iOS app and opens emulator but doesn't install

断了今生、忘了曾经 提交于 2019-12-11 02:58:44

问题


I'm making an iOS app in Cordova on MacOS.

When I run cordova emulate ios the app builds and it opens the emulator for iPhone X iOS 11.4 but it never install the app in the emulator. It just shows the emulator home screen. It just stops there.

Why is it getting here and not going any further?

UPDATE:

Now after trying to start the emulation again a second time, it gives the following error:

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.


回答1:


I have the same issue. I have resolved by building the app with cordova. then get myapp.app and run it over the emulator. you can follow the below steps:

run iOS simulator

  1. install Xcode
  2. Open emulator
  3. build the app after adding platform iOS
  4. run the app with the emulator

install ios sims

npm install -g ios-sim@next

List available simulators

xcrun simctl list

https://www.anexinet.com/blog/install-app-ios-simulator/

xcrun simctl install XXXXXXX-YYYYYY-XXXX-ZZZZ-XXXXXXXXX ~/path_to_app/myapp.app

More info https://github.com/aymansalama/cordova-build-macos



来源:https://stackoverflow.com/questions/51092089/cordova-builds-ios-app-and-opens-emulator-but-doesnt-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!