Commit 4f4bbd7
committed
fix: Unable to run app on iOS in Sidekick
When trying to run application on iOS in Sidekick for the first time (when the iOS platform is not added yet to the project), the run fails with error "Cannot read property version of undefined".
The problem is in the call to `platformLiveSyncService.prepareForLiveSync` which tries to start parsing device logs before starting the liveSync action. However, at this point, the application does not have the platform added yet and the code that tries to get the version of `tns-ios` from project's package.json fails. In order to resolve this, ensure the code for getting framework version from package.json will return undefined instead of failing.
When undefined is returned, we know CLI will add the latest compatible iOS runtime version. We know that this version will print the port for debugging in the logs, so we can safely start parsing the logs.1 parent f96bfae commit 4f4bbd7
File tree
2 files changed
+3
-2
lines changed- lib/services
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
0 commit comments