| #
1bed2683 |
| 28-Sep-2022 |
Tomasz Sapeta <[email protected]> |
[modules][ios] Install modules host object as `global.expo.modules` instead of `global.ExpoModules` (#19273)
|
| #
d16cdc51 |
| 26-Sep-2022 |
Łukasz Kosmaty <[email protected]> |
[modules][Android] Use JSI to call native methods on legacy modules (#19209)
# Why
Closes ENG-5152.
A follow-up to the https://github.com/expo/expo/pull/18438.
# How
Added callMethod to th
[modules][Android] Use JSI to call native methods on legacy modules (#19209)
# Why
Closes ENG-5152.
A follow-up to the https://github.com/expo/expo/pull/18438.
# How
Added callMethod to the new native modules proxy so we can call native methods of legacy modules through the JSI instead of the bridge.
# Test Plan
- bare-expo with NCL ✅
I've run some benchmarks to check if this change was an improvement. I've noticed a 20% performance boost over bridge implementation on the simulator. However, on the physical device, the results weren't clear. Sometimes the jsi proxy is faster and sometimes slightly slower.
show more ...
|
| #
370e2621 |
| 04-Aug-2022 |
Tomasz Sapeta <[email protected]> |
[modules][ios] Use JSI to call native methods on legacy modules (#18438)
|
| #
8bd57a9a |
| 27-Jul-2022 |
Łukasz Kosmaty <[email protected]> |
[sweet API][Kotlin] Improve JSI error handling (#18259)
# Why
Improves error handling in functions that are called via JSI.
All API errors should look like this:
```
expo.modules.kotlin.jni.Pr
[sweet API][Kotlin] Improve JSI error handling (#18259)
# Why
Improves error handling in functions that are called via JSI.
All API errors should look like this:
```
expo.modules.kotlin.jni.PromiseException: Call to function 'f.TestModule' has been rejected.
→ Caused by: java.lang.IllegalStateException
```
# How
- Exported `CodedError` and use it to wrap the bare Kotlin exceptioThathat makes expressions like this `exception instanceOf CodedError` work.
- Added more `exceptionDecorator` blocks to add more context to the exceptions inside of exported functions.
- Mocked `CodedError` class in the test environment.
# Test Plan
- unit tests ✅
show more ...
|
| #
380376ea |
| 21-Jun-2022 |
Bartłomiej Klocek <[email protected]> |
[e-m-c][ios] Expose `NativeModulesProxy` config as a JSI module (#17741)
- Created the `NativeProxyModule` - a Sweet expo-module which is a counterpart of the `NativeUnimoduleProxy` RN module (`EXNa
[e-m-c][ios] Expose `NativeModulesProxy` config as a JSI module (#17741)
- Created the `NativeProxyModule` - a Sweet expo-module which is a counterpart of the `NativeUnimoduleProxy` RN module (`EXNativeModulesProxy`)
- it is registered manually in `ExpoBridgeModule`, right after the creation of `AppContext`
- currently, it only exports constants - the same as the `EXNativeModulesProxy` module
- the constants creation logic is still written in Objective-C inside `EXNativeModulesProxy`. It will finally be migrated in the future, but there's no reason to move it in this PR.
- Refactored config creation in `EXNativeModulesProxy constantsToExport`
- created the `EXModulesProxyConfig` class - a store for the module proxy config + some convenience methods for dictionary management
- config for both legacy modules and new sweet expo-modules is now lazy-loaded and cached
- minimized Swift calls from Objective-C, as they were performance bottlenecks - now there is only one such call.
- Yet, both configs are loaded in `NativeModulesProxy.native.ts` - config constants are taken from the JSI module first (with fallback to legacy constants), but method calls are still handled by the legacy proxy module.
- We need to load both (or at least the legacy one) anyway, but this shouldn't be a big issue for now, because the config is created only once and cached.
show more ...
|
| #
bd0cffe7 |
| 30-Mar-2022 |
Tomasz Sapeta <[email protected]> |
[ios] Revert TurboModule implementation of NativeModulesProxy (#16825)
|
| #
c91d5a3e |
| 25-Oct-2021 |
Tomasz Sapeta <[email protected]> |
[ios] TurboModule implementation of expo modules proxy (#14626)
|
| #
e7f22797 |
| 30-Sep-2021 |
Tomasz Sapeta <[email protected]> |
Remove deprecated unimodules packages from repository (#14585)
|
| #
1036dd0a |
| 08-Sep-2021 |
Łukasz Kosmaty <[email protected]> |
[modules-core] Fix `Cannot read property 'addProxiedListener' of null` on Android. (#14343)
# Why
Fixes https://github.com/expo/expo/issues/14186.
The solution is based on the one proposed by @Y
[modules-core] Fix `Cannot read property 'addProxiedListener' of null` on Android. (#14343)
# Why
Fixes https://github.com/expo/expo/issues/14186.
The solution is based on the one proposed by @Yonom.
# How
In the RN 65 internal implementation of the NativeEventEmiter stars to call `addListener/removeListener` on Android. We provided a custom implementation of those methods which is using the `EXReactNativeEventEmitter`. However, this module is only available on iOS. For now, we can safely make those methods NOOP on Android, but in the future, we should create a similar module to the `EXReactNativeEventEmitter` there too.
# Test Plan
- simple app with RN 65:
show more ...
|
| #
70c51132 |
| 06-Sep-2021 |
Kudo Chien <[email protected]> |
[expo-modules-core] Fix redbox error for "Unable to find module for UMReactNativeEventEmitter" (#14276)
# Why
fix redbox error for "Unable to find module for UMReactNativeEventEmitter"
# How
[expo-modules-core] Fix redbox error for "Unable to find module for UMReactNativeEventEmitter" (#14276)
# Why
fix redbox error for "Unable to find module for UMReactNativeEventEmitter"
# How
- `UMReactNativeEventEmitter` -> `EXReactNativeEventEmitter`
- replace `EXReactNativeEventEmitter` check from `moduleForClass:` to 'moduleIsInitialized:'. the reason is that in `moduleForClass:` check will cause redbox error in dev mode if module not found.
https://github.com/expo/react-native/blob/0e9b4f9eea0f8ee316fa7ba6b7d2ad26325f8077/React/CxxBridge/RCTCxxBridge.mm#L604-L609.
# Test Plan
Tested from `@kudo/modularize-expo-update-test` branch
show more ...
|
| #
35f78160 |
| 01-Sep-2021 |
Bartosz Kaszubowski <[email protected]> |
[eslint-config] remove `arrowParens` overwrite, reformat files (#14232)
|
| #
37917d47 |
| 13-Aug-2021 |
Łukasz Kosmaty <[email protected]> |
[modules-core] Move js code (#13895)
# Why
Moves js code from `@unimodules/core` and `react-native-adapter` to `expo-modules-core`
# How
- Move js code.
- Make sure everything is compiling
[modules-core] Move js code (#13895)
# Why
Moves js code from `@unimodules/core` and `react-native-adapter` to `expo-modules-core`
# How
- Move js code.
- Make sure everything is compiling
# Test Plan
- bare-expo
- ios ✅
- android ✅
- expo go
- ios ✅
- android ✅
show more ...
|