File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
app/src/main/java/com/tns
runtime/src/main/java/com/tns Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,17 @@ public static Runtime initRuntime(Application app) {
193
193
// if app is in debuggable mode run livesync service
194
194
// runtime needs to be initialized before the NativeScriptSyncService is enabled because it uses runtime.runScript(...)
195
195
initLiveSync (runtime , logger , app );
196
+
197
+ // CLI will create this file when initial sync is needed and then will remove it after syncing the fails and restarting the app
198
+ File liveSyncFile = new File ("/data/local/tmp/" + app .getPackageName () + "-livesync-in-progress" );
199
+ if (liveSyncFile .exists ()) {
200
+ try {
201
+ // wait for the livesync to complete
202
+ Thread .sleep (30000 );
203
+ } catch (Exception ex ) {
204
+
205
+ }
206
+ }
196
207
}
197
208
198
209
runtime .runScript (new File (appDir , "internal/ts_helpers.js" ));
Original file line number Diff line number Diff line change @@ -645,6 +645,8 @@ private void createJSInstance(Object instance) {
645
645
if (jsImpl != null ) {
646
646
File jsFile = new File (jsImpl .javaScriptFile ());
647
647
runModule (jsFile );
648
+ } else {
649
+ logger .write ("Couldn't find JavaScriptImplementation annotation for class " + clazz .toString ());
648
650
}
649
651
loadedJavaScriptExtends .put (clazz , jsImpl );
650
652
}
You can’t perform that action at this time.
0 commit comments