-
Notifications
You must be signed in to change notification settings - Fork 253
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
iOS 11/Xcode 9 compatibility #218
Comments
Investigating why it's not showing the new sims. |
7 device types are skipped on this line: https://github.com/phonegap/ios-sim/blob/4bbe6b3307b594d9bf78775418fea139e71eabb1/src/lib.js#L330
|
If you run
which don't correspond to the device names when running Also, weirdly the 12.9" iPad Pro is this, just plain iPad-Pro: "iPad Pro, 9.3" is similarly missing in devicetypes since it is now iPad-Pro--9-7-inch- |
I hate to do this, but we may have to do a mapping function to match the mismatched devicetypes. |
See #219 PR, fixes this issue |
Wow - rapid response :) thanks @shazron. I will check it out. How do I raise the bug against Xcode, if this is Apple's doing? |
I have just seen you were up late fixing this - thanks for the dedicated effort. |
I have installed ios-sim v6.1.1 and am seeing exactly the same behavior as @kelvindart in the OP above. I am able to launch the simulator from Xcode 9, just not from the cli. Is there something else that needs to be done on my end to resolve this? thx |
Not enough info. Are you using cordova-ios? There needs to be a platform update since ios-sim is baked in there. |
@shazron same probleme here, and yes I'm using cordova-ios. So we have to wait for an platform update… |
@jmargolese and @MaxDaten, since updating to ios-sim@6.1.1, it works fine for me. Make sure to follow @shazron's point on the platform update (i.e. update cordova-ios to the latest, cordova-ios@4.5.0) First, check which version you are running in your local project:
Then remove it, and add the latest version:
This will install the latest, which is compatible with Xcode 9/iOS 11 and sims. Also, follow the point on Cordova's blog (https://cordova.apache.org/announcements/2017/09/08/ios-release.html) about I believe the console is now integrated into the platform to use |
There is a minor issue when running:
But I will open a separate issue for this. |
Using 4.5.0 solves the issue for me, but forces me to rollback to use 4.4.0 because of: |
I can't tell if 4.5.0 solves the problem. After following @kelvindart 's suggestions, the build command fails with the same problem @KevinBeckers reports above. |
@kelvindart it works for me with |
All, remove the cordova-plugin-console plugin. See the cordova-ios@4.5.0 blog post: |
@shazron This fixed my issue. |
Although my issue isn't quite the same as the original issue, it seems likely related, especially re @shazron's fix. I get I've removed cordova-plugin-console.
Any suggestions? |
@jezmck ios-sim has been updated in cordova-ios master branch. Unfortunately you will have to wait for cordova-ios@4.5.1 release (we are starting the vote tomorrow, so prob released next week) or just |
That's amazing, thank you! |
I'm running an ionic app. Setup
I am also receiving the I ran the
Any ideas? |
@Ericdowney Looks like interesting situation .. I suggest that you do:
I had similar problem liek you, and for example I got a swift version error in xcode (that I have unsuported swift 2 code ...) then I set in xcode in project config to swift 3.2 and then it started to work. So in the end check generated project in xcode. |
@Ericdowney Make sure you change directories back to the root of your project before running the |
If you are getting: Try the approach suggested by @shazron |
I ran: |
Hey @herberzt, I just tried this and it launched in the simulator just fine. What is the error message you are seeing? |
hey @surajpindoria sorry I just now saw this. when i run : I get a large thing of output but the main error at the bottom is: |
@herberzt, I just tried this again in a different project and was actually able to see the same error as you. But I was able to get rid of it by removing the iOS platform and then re-adding it. Make sure you are using the latest version, |
@surajpindoria okay I will give this a try. Thank you. |
@surajpindoria I took your guidance and did the following:
went to go run the simulator again and I'm still getting the same error message. |
Hmmm, are you able to deploy to the iPad Pro emulator directly from Xcode? You can open your project in Xcode by running |
@herberzt Just noticed something on my machine that could explain why you are not able to launch the iPad Pro emulator. Can you run This could explain why you are not able to launch the emulator. |
Had this issue today, after updating to ionic 3.19.0.
|
when I run ionic cordova build ios --prod. I have a error
[ERROR] An error occurred while running cordova build ios (exit code 1). how to handle this ? |
@pangjianfeng this is not a Cordova issue tracker. Looks like you need to install the full Xcode and for example put it in |
Thank you saved my day. |
Expected behavior
To be able to deploy to the iOS simulator when Xcode 9 is installed with the iOS 11 SDK, with the ability to select the additional simulators from the list.
Actual behavior.
When I try to run
cordova emulate ios
without specifying a default device, I receive the following error:Despite there being default simulators installed, it appears like it is not selecting the first relevant simulator, instead, just whatever is at the top of the list.
If I run
ios-sim showdevicetypes
, I am returned the following list, which is omitting the new simulators (iPhone 8, iPhone 8 Plus and the iPhone X), and has the Apple-Watch listed at the start (which, as explained below, is now the default):If I then run
ios-sim start
, it states:I expect, because of this, it's trying to deploy the Cordova app to the Apple Watch, hazard a guess?
If I do specify an iOS emulator to deploy to, I receive the following:
Steps to reproduce the problem
As above (assuming Cordova and ios-sim are installed).
cordova start SimApp && cd SimApp
cordova emulate ios --target="iPhone-7"
System Specs
Please run the commands below in your Terminal.app and include it in the issue. Check when done and include results below.
1. system_profiler SPSoftwareDataType:
2. ios-sim --version:
3. xcodebuild -version:
4. xcode-select --print-path:
5. node --version:
6. npm --version:
The text was updated successfully, but these errors were encountered: