Skip to content

Commit

Permalink
feat(voltron): add voltron ios inspectable
Browse files Browse the repository at this point in the history
  • Loading branch information
henryjin0511 committed Jul 3, 2023
1 parent 40d6258 commit 9a7c070
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions framework/voltron/core/src/bridge/ios/VoltronJSCExecutor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ - (void)setup {

std::shared_ptr<hippy::napi::JSCCtx> context = std::static_pointer_cast<hippy::driver::napi::JSCCtx>(scope->GetContext());
JSContext *jsContext = [JSContext contextWithJSGlobalContextRef:context->GetCtxRef()];
// #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_16_2
// if (@available(iOS 16.4, *)) {
// jsContext.inspectable = true;
// }
// #endif
#if defined(__IPHONE_16_4) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_16_2
if (@available(iOS 16.4, *)) {
jsContext.inspectable = true;
}
#endif
auto global_object = context->GetGlobalObject();
auto user_global_object_key = context->CreateString(kGlobalKey);
context->SetProperty(global_object, user_global_object_key, global_object);
Expand Down

0 comments on commit 9a7c070

Please sign in to comment.