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

fix: hmr for iOS does not work on Windows #4732

Merged
merged 2 commits into from
Jun 17, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented Jun 17, 2019

With tns cloud run ... command (or with NativeScript Sidekick), you can use LiveSync on iOS device from Windows machine (with application built in the cloud). However, this approach does not work when the iOS device does not have developer disk image mounted (i.e. it has not been used on macOS).
The problem is that during establishment of socket connection, CLI tries to start the application. This is a precautions for cases when the application had crashed. In most of the cases when we reach to this code, the application is already up and running. However, calling startApplication fails on Windows and we never setup the socket connection.
So the HMR does not work at all.

Fix this by adding a try-catch block around starting of application when trying to setup the socket connection.

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

With `tns cloud run ...` command (or with NativeScript Sidekick), you can use LiveSync on iOS device from Windows machine (with application built in the cloud). However, this approach does not work when the iOS device does not have developer disk image mounted (i.e. it has not been used on macOS).
The problem is that during establishment of socket connection, CLI tries to start the application. This is a precautions for cases when the application had crashed. In most of the cases when we reach to this code, the application is already up and running. However, calling `startApplication` fails on Windows and we never setup the socket connection.
So the HMR does not work at all.

Fix this by adding a try-catch block around starting of application when trying to setup the socket connection.
@rosen-vladimirov rosen-vladimirov merged commit 35d9076 into release Jun 17, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-hmr-ios-windows branch June 17, 2019 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants