Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core][ios] Fix jsc import when using use_frameworks #21479

Merged
merged 2 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/expo-modules-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### 🐛 Bug fixes

- [iOS] Fixed jsc import when using use_frameworks
gabrieldonadel marked this conversation as resolved.
Show resolved Hide resolved

### 💡 Others

## 1.2.3 - 2023-02-21
Expand Down
5 changes: 4 additions & 1 deletion packages/expo-modules-core/ios/JSI/EXJavaScriptRuntime.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#elif __has_include(<React-jsc/JSCRuntime.h>)
// react-native@>=0.71 has a specific React-jsc pod
#import <React-jsc/JSCRuntime.h>
// use_frameworks! transforms the dash to underscore
#elif __has_include(<React_jsc/JSCRuntime.h>)
#import <React_jsc/JSCRuntime.h>
#else
#import <jsi/JSCRuntime.h>
#endif
Expand Down Expand Up @@ -176,7 +179,7 @@ - (nonnull EXJavaScriptValue *)evaluateScript:(nonnull NSString *)scriptSource
}];
} catch (jsi::JSIException &error) {
NSString *reason = [NSString stringWithUTF8String:error.what()];

@throw [NSException exceptionWithName:@"ScriptEvaluationException" reason:reason userInfo:@{
@"message": reason
}];
Expand Down