Skip to content

Commit

Permalink
chore: move invocation (#13818)
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Apr 24, 2023
1 parent 5a94152 commit 4bcdca9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions iphone/Classes/AppModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,15 @@ - (void)startup
[nc addObserver:self selector:@selector(keyboardFrameChanged:) name:UIKeyboardWillChangeFrameNotification object:nil];
[nc addObserver:self selector:@selector(timeChanged:) name:UIApplicationSignificantTimeChangeNotification object:nil];

// Ensure that the JSContext is debuggable during development
if (@available(iOS 16.4, *)) {
BOOL isProduction = [TiSharedConfig.defaultConfig.applicationDeployType isEqualToString:@"production"];

if (!isProduction) {
JSGlobalContextSetInspectable([[(KrollBridge *)TiApp.app.krollBridge krollContext] context], YES);
}
}

[super startup];
}

Expand Down
9 changes: 0 additions & 9 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ - (void)booted:(id)bridge
}
[_queuedApplicationSelectors removeAllObjects];
}

// Ensure that the JSContext is debuggable during development
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160400
BOOL isProduction = [TiSharedConfig.defaultConfig.applicationDeployType isEqualToString:@"production"];

if (!isProduction) {
JSGlobalContextSetInspectable([[(KrollBridge *)bridge krollContext] context], YES);
}
#endif
}
}

Expand Down

0 comments on commit 4bcdca9

Please sign in to comment.