Skip to content

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

Closed

Description

@manijak

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".

Activity

  1. rosen-vladimirov commented on Mar 1, 2016

    @rosen-vladimirov
    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

  2. enchev commented on Jun 27, 2016

    @enchev
    Contributor

    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!

  3. 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
  4. self-assigned this
    on Jun 27, 2016
  5. manijak commented on Jun 27, 2016

    @manijak
    Author

    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

  6. enchev commented on Jun 27, 2016

    @enchev
    Contributor

    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.

  7. dtopuzov commented on Jul 1, 2016

    @dtopuzov
    Contributor

    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. 8 remaining items

  9. removed their assignment
    on Oct 10, 2016
  10. removed this from the 2.4.0 milestone on Oct 20, 2016
  11. added this to the milestone on Dec 5, 2016
  12. modified the milestone: on Jan 26, 2017
  13. added this to the 4.0.1 milestone on Apr 16, 2018
  14. dtopuzov commented on Apr 25, 2018

    @dtopuzov
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions