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

--sdk flag not working properly when starting emulators in iOS #1548

Closed
manijak opened this issue Feb 26, 2016 · 6 comments
Closed

--sdk flag not working properly when starting emulators in iOS #1548

manijak opened this issue Feb 26, 2016 · 6 comments

Comments

@manijak
Copy link

manijak commented Feb 26, 2016

I am trying to run LiveSync on my app with specific --device and --sdk flags. But they do not seem to work out of the box.

When I try to run:
tns livesync ios --emulator --device 'iPhone 6' --sdk 9.2 --watch
I get the following error:
Cannot resolve the specified connected device by the provided index or identifier. To list currently connected devices and verify that the specified index or identifier exists, run 'tns device'.

LiveSync should start the emulator if it is not running, with all the flags applied?

If I run this:
tns livesync ios --emulator --sdk 9.2 --watch
It starts the emulator with iPhone6 and with iOS 8.4, not 9.2 as I specefied.

In order to get my livesync running with iPhone 6 and iOS 9.2 I had to do the following:
tns emulate ios --device 'iPhone 6' --sdk 9.2 --justlaunch
tns livesync ios --device 1 --sdk 9.2 --watch

So two command lines, plus I had to use --device [index] as it didn't find the device by name...

EDIT: The first command used to work fine on 1.5.2, except the --sdk flag. So now in 1.6.2 also the --device flag seems to be "broken".

@rosen-vladimirov
Copy link
Contributor

@manijak ,

Thanks for reporting this. I can confirm the behavior is incorrect and we'll fix it in one of our next releases (of course you are more than welcome to submit a PR with the fix).
You can simplify the workaround by using:

$ tns emulate ios --device 'iPhone 6' --sdk 9.2 --justlaunch
$ tns livesync ios --watch

The second command will work with the iOS Simulator directly, so there's no need to specify device and sdk

@enchev
Copy link
Contributor

enchev commented Jun 27, 2016

Hey @manijak ,

--device option is intended to work with already attached devices and cannot start a device using specified sdk. --emulator however should do this and I can confirm that --sdk flag is not working as expected. We will do our best to fix it immediately!

@enchev enchev changed the title Weird behavior from LiveSync on iOS, I think... --sdk flag not working properly when starting emulators in iOS Jun 27, 2016
@enchev enchev added the os: ios label Jun 27, 2016
@enchev enchev self-assigned this Jun 27, 2016
@manijak
Copy link
Author

manijak commented Jun 27, 2016

Hmmm... This is an old issue. I am currently using the --sdk flag when starting the emulator and it works fine :) After that I just run tns livesync ios --watch and all is good

@enchev
Copy link
Contributor

enchev commented Jun 27, 2016

Hey @manijak,

You are right, my mistake. It seems however that we have regression with our current master branch for run and emulate commands with --sdk switch.

I'm closing the issue, we will handle this internally.

@enchev enchev closed this as completed Jun 27, 2016
@dtopuzov
Copy link
Contributor

dtopuzov commented Jul 1, 2016

Fails again (even with {N} 2.1.0 official release):

tns livesync ios --emulator --device 'iPhone 6s' --sdk 9.2 --watch --path TestApp
=>
Cannot resolve the specified connected device by the provided index or identifier. To list currently connected devices and verify that the specified index or identifier exists, run 'tns device'.

instruments -s | grep 'iPhone 6s'
=>
iPhone 6s (9.2) 93C3DCED-E23A-49DC-93B6-A04BA2BA1571
iPhone 6s (9.3) 83E83FF2-9B8E-4CBC-AD38-0A7A0DCFEFC7
iPhone 6s (9.3) + Apple Watch - 38mm (2.2) FEE427A4-3D6C-4D4F-A80E-BE85A914DCB8
iPhone 6s 90 (9.0) B96EF8D7-3349-488C-B478-B9CA07347D9B
iPhone 6s Plus (9.2) 1D148E13-D518-46B2-8A2F-C03307661C27
iPhone 6s Plus (9.3) F32E788F-F3AC-406A-B047-605545EB70ED
iPhone 6s Plus (9.3) + Apple Watch - 42mm (2.2) 76BD1836-B075-4DDC-A7C3-7F80F68B5AE5

@dtopuzov dtopuzov reopened this Jul 1, 2016
@dtopuzov dtopuzov added this to the 2.2.0 milestone Jul 1, 2016
@enchev enchev removed their assignment Jul 27, 2016
@enchev enchev removed this from the 2.2.0 milestone Jul 27, 2016
@tzraikov tzraikov self-assigned this Aug 3, 2016
@tzraikov tzraikov added this to the 2.4.0 milestone Sep 20, 2016
@tzraikov tzraikov removed their assignment Oct 10, 2016
@tzraikov tzraikov removed this from the 2.4.0 milestone Oct 20, 2016
@tsonevn tsonevn added this to the 2.6.0 (TBD) milestone Dec 5, 2016
@pkoleva pkoleva modified the milestone: 2.6.0 (TBD) Jan 26, 2017
@dtopuzov
Copy link
Contributor

With 4.0.1 RC now you can do things like this:

tns run ios --device 'iPhone 7' --sdk 11.3 --path TestApp

To find out availalbe devices and sdks you can run:

tns device ios --available-devices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants