问题
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
- install Xcode
- Open emulator
- build the app after adding platform iOS
- 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