You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--sdk flag not working properly when starting emulators in iOS #1548
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".
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:
--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!
changed the title [-]Weird behavior from LiveSync on iOS, I think...[/-][+]--sdk flag not working properly when starting emulators in iOS[/+]on 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
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'.
Activity
rosen-vladimirov commentedon Mar 1, 2016
@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:
The second command will work with the iOS Simulator directly, so there's no need to specify device and
sdkenchev commentedon Jun 27, 2016
Hey @manijak ,
--deviceoption is intended to work with already attached devices and cannot start a device using specified sdk.--emulatorhowever should do this and I can confirm that--sdkflag is not working as expected. We will do our best to fix it immediately![-]Weird behavior from LiveSync on iOS, I think...[/-][+]--sdk flag not working properly when starting emulators in iOS[/+]manijak commentedon Jun 27, 2016
Hmmm... This is an old issue. I am currently using the
--sdkflag when starting the emulator and it works fine :) After that I just runtns livesync ios --watchand all is goodenchev commentedon Jun 27, 2016
Hey @manijak,
You are right, my mistake. It seems however that we have regression with our current master branch for
runandemulatecommands with--sdkswitch.I'm closing the issue, we will handle this internally.
dtopuzov commentedon 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
8 remaining items
Support for getting device by name and sdk
Support for getting device by name and sdk
Support for getting device by name and sdk
dtopuzov commentedon Apr 25, 2018
With 4.0.1 RC now you can do things like this:
To find out availalbe devices and sdks you can run: