History log of /expo/packages/expo-modules-core/ios/AppDelegates/EXAppDelegatesLoader.m (Results 1 – 5 of 5)
Revision Date Author Comments
# 9ad1395c 27-Apr-2022 Tomasz Sapeta <[email protected]>

[ios] Refactor Expo modules registration (#17225)


# 5ec78750 30-Mar-2022 Kudo Chien <[email protected]>

[core] Fix ModulesProviderProtocol casting error in XCTest targets (#16733)

# Why

fix the `Fatal error: Expo modules provider must implement "ModulesProviderProtocol"` from XCTest targets and Swi

[core] Fix ModulesProviderProtocol casting error in XCTest targets (#16733)

# Why

fix the `Fatal error: Expo modules provider must implement "ModulesProviderProtocol"` from XCTest targets and SwiftUI preview builds.
fixes #16353

# How

it gets a little strange to me for the inconsistent behavior between normal targets and XCTest targets. the modulesProviders's `isa` pointer is generated `ExpoModulesProvider`, but it seems in the runtime ios cannot cast the instance back to swift.

my solution is to remove `ModulesProviderObjCProtocol`. since we can support objc <> swift interop right now, we can use `ModulesProvider` directly in objc.

# Test Plan

- bare-expo build and launch
- follow #16353 repro steps
- `npx react-native init` + `npx install-expo-modules` + test the XCTest target

show more ...


# 370fa39d 28-Feb-2022 Kudo Chien <[email protected]>

[android][ios] Fix versioning for expo go after react-native 0.67.2 upgrade (#16401)

# Why

for sdk45 and based on #16400

# How

- [tools] Fix versioning tools for react-native 0.67.2 upgrade

[android][ios] Fix versioning for expo go after react-native 0.67.2 upgrade (#16401)

# Why

for sdk45 and based on #16400

# How

- [tools] Fix versioning tools for react-native 0.67.2 upgrade
- [expo-modules-core][ios] Fix missing `EX` prefix to some objective-c files for versioning support
- [autolinking] Apply our cocoapods fix for `React-Core` swift support to versioned code
- [expo-updates] fix an incompatible `ReactInstanceManager` in UpdatesPackage where UpdateController is unversioned but UpdatePackage is versioned.
- [expo-file-system] okhttp/okio code for new versioned code build successfully. this is done in #16446

# Test Plan

- `et add-sdk -p android -s 45.0.0` and build/launch sdk 45 expo go with sdk 45 ncl
- `et add-sdk -p ios -s 45.0.0` and build/launch sdk 45 expo go with sdk 45 ncl

show more ...


# 0f5f192f 01-Dec-2021 Kudo Chien <[email protected]>

[core] Introduce iOS ReactDelegate for React related instances creation (#15138)

# Why

original modularized AppDelegateWrapper isn't ideal for expo-updates. we had some bad side effect, e.g. doub

[core] Introduce iOS ReactDelegate for React related instances creation (#15138)

# Why

original modularized AppDelegateWrapper isn't ideal for expo-updates. we had some bad side effect, e.g. double bridge creation on startup.

close ENG-2299

# How

## For module authors

introduce `EXReactDelegate` dedicated for react related instances creation. so far we covered:

- RCTBridge
- RCTRootView
- RootViewController (for expo-screen-orientation)

if a module wants to handle these creation, there's 2 steps:

1. add `reactDelegateHandlers` in `expo-module.config.json`, e.g.

```
"ios": {
"reactDelegateHandlers": ["ScreenOrientationReactDelegateHandler"]
}
```

2. create `EXReactDelegateHandler` derived swift class, e.g.

```swift
// ScreenOrientationReactDelegateHandler.swift
public class ScreenOrientationReactDelegateHandler: ExpoReactDelegateHandler {
public override func createRootViewController(reactDelegate: ExpoReactDelegate) -> UIViewController? {
return EXScreenOrientationViewController()
}
}
```

since the order of whom to create the instance did matter, we also introduce `ModulePriorities.swift` similar to what we did on android.

## For app developers

the change to template is minimal, so codemod by `npx install-expo-modules` is also feasible.

```diff
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
- RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil];
+ RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
+ RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- UIViewController *rootViewController = [UIViewController new];
+ UIViewController *rootViewController = [self.reactDelegate createRootViewController];
```

show more ...


# 0fb97ace 29-Oct-2021 Tomasz Sapeta <[email protected]>

[ios] New ExpoAppDelegate independent of singleton modules (#14867)