Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordova run ios -target iPhone-XR leads to Building for "iPhone X" Simulator, later not able to start XR simulator to run the app #602

Closed
3 tasks done
janpio opened this issue Apr 16, 2019 · 3 comments
Labels

Comments

@janpio
Copy link
Member

janpio commented Apr 16, 2019

Bug Report

This is a variant of #603, where the underlying problem causes failure.

Problem

What is expected to happen?

cordova run --emulator should be able to use the simulators returned from cordova run --list to build and start the app.

What does actually happen?

This is probably related to #601, which affects Xcode 9.x Travis CI images:
For the Xcode 10.1 image the failure is stranger:

https://travis-ci.org/apache/cordova-paramedic/jobs/519983899

This time iPhone-XR, 12.0 is selected as the simulator, but the build is done for iPhone X:

$ cordova run ios --no-telemetry --no-update-notifier --target iPhone-XR --emulator
Building for "iPhone X" Simulator (com.apple.CoreSimulator.SimDeviceType.iPhone-X, iPhone-X)
Building project: /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp-2606aUPAbUbzTgkB/platforms/ios/HelloCordova.xcworkspace
	Configuration: Debug
	Platform: emulator
	Target: iPhone X

The internal logic of run seems to have picked something different than specified in --target.

The real problem, is that later it tries to launch that app on a iPhone XR simulator, which just fails (with no error message being output, currently working on a PR to fix that at least). When you try an equal command locally, you get this error from ios-sim: No available runtimes could be found for "iphone xʀ".

Information

Version information

CLI 9, cordova-ios 5.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@dpogue
Copy link
Member

dpogue commented Apr 17, 2019

I suspect it's failing to find an iPhone-XR simulator and falling back to the default simulator target.

As part of #596 I've added a warning message to print out when it fails to find the requested simulator and falls back to the default one.

@janpio
Copy link
Member Author

janpio commented Apr 17, 2019

That's a great idea, to differentiate between those two cases and should definitely help here.

@erisu
Copy link
Member

erisu commented Mar 7, 2024

Will close out this ticket as no longer an issue.

Using the latest cordova-ios release (7.0.1), running the above command cordova run ios --target=iPhone-XR shows that the target is iPhone Xʀ.

It successfully builds and deploys app to the iPhone Xʀ simulator.

@erisu erisu closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants