Skip to content

Commit

Permalink
Fix Symbol not found: (_JSGlobalContextSetInspectable) (#44185)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44185

This change will fix a symbol not found for JSC Runtime.

The `if` check was not a compile time check, therefore the symbol ended up in the binary even if it is not available.

Following this post on [Apple forum](https://forums.developer.apple.com/forums/thread/749534), this changes should do the trick.

## Changelog
[iOS][Fixed] - Fix Symbol not found: (_JSGlobalContextSetInspectable)

Reviewed By: hash3r

Differential Revision: D56425834

fbshipit-source-id: a37af51b078bd47a938e6b65d9d8e0f7506e746f
  • Loading branch information
cipolleschi authored and hurali97 committed Apr 29, 2024
1 parent 2101003 commit ae4c62a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-native/ReactCommon/jsc/JSCRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,13 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
{
#ifndef NDEBUG
#ifdef _JSC_HAS_INSPECTABLE
#if (__OSX_AVAILABLE_STARTING(MAC_NA, IPHONE_16_4))
if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
JSGlobalContextSetInspectable(ctx_, true);
}
#endif
#endif
#endif
}

JSCRuntime::~JSCRuntime() {
Expand Down

0 comments on commit ae4c62a

Please sign in to comment.