Autoplay

    Edit with live reloading using NativeScript livesync

    Nathan WalkerNathan Walker

    Learn how to use the livesync option to make quick changes to css and/or Angular components to see live updates in the emulators or on devices. Also learn how to run livesync simultaneously on iOS and Android.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    00:00 For a faster development experience, we can use TNS Livesync and then the platform you would like to live sync on. In this case, we'll use IOS.

    00:08 We'll pass the dash dash emulator flag, and then dash dash watch, and we notice now, if we make a change and save, you'll see at LiveReload over here.

    00:19 You can also run the same command against android and that will run against any android emulator you have running. We can see that now live reload on android.

    00:29 In addition to android and IOS specific options, you can omit the emulator flag, and that will actually run Livesync on any android connected devices and emulators at the same time. Same goes if you use IOS. That will run on any connected iPhone and if you have the emulator running.

    00:49 You can also omit the platform name all together, and that will run Livesync on all connected devices and emulators. If you just wanted to run Livesync on the android and IOS emulators at the same time, you can use TNS Livesync with the emulator in watch flags.

    01:06 Now when we make a change, we'll see them both update in the IOS emulator and in the android emulator, as well.

    Discuss

    Discuss