Skip to content

Commit

Permalink
[core][ios] Fix jsc import when using use_frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldonadel committed Mar 2, 2023
1 parent 6fe8501 commit 4ba4a9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

### 💡 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

0 comments on commit 4ba4a9a

Please sign in to comment.