-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Simulators with (
in name are not started after tns run ios --device <device_name>
#2131
Comments
Looks a lot like this: ios-control/ios-sim#197 |
@asterizk Do you need to reinstall nativescript after you add your workaround? |
No, I don't think so, but, for what it's worth, I haven't tried it in a couple of months so it may no longer work... ? What are you seeing? |
Hi, I've just installed NativeScript. iPad Air 2 is detected as a simulated device. The demo app starts just fine. iPad Pro (both types) is not detected. |
iPad Pro also not detected on my setup. Annoying because the App submission process requires screenshots from the 12.9" Pro, and I just got a "Metadata Rejected" from Apple due to lack of accurate screenshots from that device. |
Any news on this? Apple won't let me submit my app without iPad Pro pictures, but I can't simulate on iPad Pro. |
@nraboy , @grasshoppermouse you can change the device type of your simulator by executing the following steps:
Hoep this helps. |
That does not work @rosen-vladimirov. It never deploys the app even with the correct simulator running. Works for every simulator except iPad Pro. |
@nraboy is correct: switching simulators first doesn't help; files still don't transfer and the app doesn't launch. I used the hack of @asterizk, and then it seemed to work. However, the simulator that started running was the |
@grasshoppermouse it didn't work for me. I'm pretty bummed right now because I worked hard on my application and Apple won't let me submit until I get iPad Pro images. @rosen-vladimirov any ideas here? |
I confirmed this as well. Even if you launch the 12.9 emulator you are unable to deploy to it from the {N} CLI. As a temporary workaround until this problem can be addressed, your best bet is running your app on the “iPad Retina”, which gives you 1536 x 2048 screenshots, and then manually upsizing those screenshots to the required 2048 x 2732 size. Not ideal because you lose a bit of quality, but I’ve taken this approach before and had apps accepted. |
@nraboy , @grasshoppermouse , @tjvantoll sorry for this issue 😿
As a workaround you may try the following:
This will build your application for iOS Simulator. Find the output in your After that, make sure your iOS Simulator (the problematic iPad one) is running and execute:
From this line get the identifier of the booted device.
|
With simulator running
|
Hey guys,
after that.
I'll keep this issue open until we fix the whole behavior, so Can you try reinstalling NativeScript CLI and see if you are able to deploy on the iPad Pro emulators? |
Hey all, we will be deprecating the emulate command (more info here). From 3.0 you can use |
(
in name are not started after tns run ios --device <device_name>
Current state with 3.0.0 RC: |
Thanks for keeping the issue up-to-date guys, and for your time. @dtopuzov @pkoleva @rosen-vladimirov. Am I correct in my assertion that this is basically a "ios-sim-portable" issue, manifesting itself within the Nativescript CLI? |
Hey, @asterizk , The main issue is that so far we've used other logic for starting simulators/deploying on them. With the changes ( in our 3.0.0 release and the RC before that) we weren't sure what will be useful to you, our users, so for iOS we haven't decided how to start simulators by their name. You can start any existing simulator by id ( |
Related to #1548 |
Fixed in 4.0.1 RC (4.0.1-2018-04-23-11424).
To see all available devices and sdks run this:
|
I can't run
tns emulate ios --device "iPad Pro (12.9 inch)"
Doing so results in the following message:
Starting iOS Simulator Unable to find device iPad Pro (12.9 inch). The valid device names are iPhone 5, iPhone 5s, iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhone 7 Plus, iPhone SE, iPad Retina, iPad Air, iPad Air 2
Expected result:
This error occurs despite 'xcrun simctl list' outputting the 12.9" iPad as an option.
I believe I've tracked the root cause down to the fact that "iPad Pro (9.7 inch)" and the "iPad Pro (12.9 inch)" devices contain parentheses in their names, and the regex that parses the output of 'xcrun simctl list' doesn't expect those parentheses to be there:
var lineRegex = /^ ([^\(]+) \(([^\)]+)\) \(([^\)]+)\)( \(([^\)]+)\))*/;
That regex is contained in the following file:
/usr/local/lib/node_modules/nativescript/node_modules/ios-sim-portable/lib/simctl.js.
I guess that means it's a problem with the ios-sim-portable module. I've got version 1.3.0 of it. I will file an issue with that project. In the meantime I'm working around it by manually adding devices to the device list in
simctl.js
:...right before the
return devices;
statement.Obviously that's a big hack and not a solution (the solution would involve fixing that regex), but at the present it allows me to launch my Nativescript app on the 12.9" iPad under emulation, which is pretty important for me because it's the only iOS platform my company actually supports at the moment.
Feel free to close this if issues in dependencies shouldn't be filed here. I just thought I might file it because it manifested itself while I was using 'tns' and it might help someone else out.
My config:
OS X 10.11.6
Xcode 8.0 (8A218a)
tns --version: 2.3.0
ios-sim-portable: 1.3.0
npm --version: 3.10.8
tsc --version: Version 2.0.3
The text was updated successfully, but these errors were encountered: