Upgrade react-native 0.72.0-rc.5 (#22588)# Why upgrade react-native 0.72 for sdk 49 close ENG-8011 # How - bump package versions - `react-native 0.71.3 -> 0.72.0-rc.5` - `metro-reac
Upgrade react-native 0.72.0-rc.5 (#22588)# Why upgrade react-native 0.72 for sdk 49 close ENG-8011 # How - bump package versions - `react-native 0.71.3 -> 0.72.0-rc.5` - `metro-react-native-babel-preset 0.73.9 -> 0.76.5` - [bare-expo][templates][fabric-tester] migrate template base on [upgrade-helper](https://react-native-community.github.io/upgrade-helper/?from=0.71.7&to=0.72.0-rc.5) - [expo-template-tabs] remove the metro version overrides for expo-router. - [core][dev-laucher][dev-menu][media-library][screen-orientation][splash-screen][updates-interface][updates] add the `install_modules_dependencies` to support new architecture + use_frameworks! - [core][autolinking] fix some new architecture error on ios - [react-native-lab] update our fork to 0.72.0-rc.5 based - [go][tools] fix **react-native-lab/react-native/packages/react-native** path move because of react-native's repo monorepo changes - [go][android] fix gradle 8 errors - [go][ios] add `RCT_REMOTE_PROFILE=0` to fix the `RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE` build error - [ncl] remove `ProgressViewIOS` / `ProgressBarAndroid` since they are deprecated/removed in 0.72 - [dev-menu][dev-launcher] rebuild bundles # Note - react-native-web is not bumped because of the [issue](https://github.com/necolas/react-native-web/issues/2523), so it's still react-native-web@~0.18.10. - currently disable ci typecheck for @expo/cli because of upstream metro typescript support. i'll have another pr to fix those errors. - updates e2e ci on android is broken at [here](https://github.com/expo/expo/blob/fada3d764957779fbfc3d7b723d185db1d933d95/packages/expo-updates/e2e/fixtures/Updates.e2e.ts#L518). i doubt if that's related to the react scheduler change. i'd disabled the failed test case. - the react-native upstream [migrated away the `@types/jest`](https://github.com/facebook/react-native/pull/36068). i was afraid that will be a breaking change to the existing jest test code since it requires the explicit `@jest/globals` import. i didn't do this in this upgrade. # Test Plan - ✅ fabric-tester (without expo-dev-client) - ✅ ci passed. there are some errors which are known: - updates e2e on android: as mentioned above - ios expo go on eas build: versioned expo go are broken on eas build m1 worker. this is also happening on main. - android client: no space left on the ubuntu worker. this is also happening on main. - ✅ bare-expo - ✅ unversioned expo go + ncl --------- Co-authored-by: Tomasz Sapeta <[email protected]>
show more ...
[1/3] upgrade react-native 0.71 (#20799)# Why upgrade react-native 0.71 for sdk 48 close ENG-7192 # How - update package versions - `react: 18.1.0 -> 18.2.0` - `react-native 0.70.5
[1/3] upgrade react-native 0.71 (#20799)# Why upgrade react-native 0.71 for sdk 48 close ENG-7192 # How - update package versions - `react: 18.1.0 -> 18.2.0` - `react-native 0.70.5 -> 0.71.0` - `react-dom: 18.1.0 -> 18.2.0` - `react-test-renderer: 18.1.0 -> 18.2.0` - `react-native-web: 0.18.9 -> 0.18.10` - `babel-plugin-react-native-web: 0.18.9 -> 0.18.10` - `metro-react-native-babel-preset: 0.72.3 -> 0.73.5` - upgrade three project templates based on [upgrade-helper](https://react-native-community.github.io/upgrade-helper/?from=0.70.6&to=0.71.0) - bare-expo - expo-template-bare-minimum - fabric-tester (this is based on `npx expo prebuild --clean --no-install --template /path/to/expo-template-bare-minimum.tgz`) so it includes some inconsistent changes - [@expo/config-plugins]: support 0.71 template transform. the `namespace` in build.gradle and the files in `release` build variants - [fbjni] upgrade 0.3.0 to align 0.71 (also ndk version) - [expo-updates] move the `EX_UPDATES_NATIVE_DEBUG` `bundleInDebug` setup to templates. unfortunately, because RNGP setups the task dependencies pretty early. the original setup in expo-updates build.gradle is too late. note that the change doesn't reference any files from templates to expo-updates package. somehow it's not tightly coupled. - [native-tests / expo-modules-test-core / expo-modules-autolinking] fix ios unit test build error because jsc now in a dedicated podspec. in theory, the ios native unit test could now run on hermes as well. - for other details, please check commit histories one by one. # Test Plan - bare-expo ios / android - fabric ios / android - ci passed (except ios) - test-suite ios is broken for unknown reasons. it breaks only on github actions and hermes. for nightlies testing, i also [changed it to jsc](https://github.com/expo/expo/blob/1e029c89c4247802cc4880e27e116a6b4c71c502/tools/src/commands/SetupReactNativeNightly.ts#L287-L293) to make ci green. i'll try to follow up and investigate the root cause.
[modules] Fix incompatible issue for react-native 0.71 (#20470)# Why sdk 48 may come next year and react-native 0.71 may be released this year. it's good to have react-native 0.71 support for ou
[modules] Fix incompatible issue for react-native 0.71 (#20470)# Why sdk 48 may come next year and react-native 0.71 may be released this year. it's good to have react-native 0.71 support for our modules. if users want to upgrade 0.71, they could change their project to be a bare project for the early preview. # How - [core][av][gl] because 0.71 doesn't serve android aar along with npm package, the aar extraction from `node_modules/react-native/android/**/*.aar` will break on 0.71. 0.71 also ships modules with prefab support. it's good to rewrite the gradle/cmake files to link with prefab modules. that would reduce much complexity. however, to be backward compatible with 0.70, i moved most logic to `ExpoModulesCorePlugin.applyLegacyReactNativeLibsExtractionPlugin` and `legacy/CMakeLists.txt`. so that we could be backward compatible and easily remove the isolated code after we drop sdk 47 support. - [dev-launcher] add 0.71 sources because new parameter to `DevSupportManagerBase` - [core][dev-menu] fix ios build errors for jsc because 0.71 moved the header to `<React-jsc/JSCRuntime.h>` - [core][autolinking] integrate the `RCTAppDelegate` with our `EXAppDelegateWrapper`. that would simply the install-expo-modules migration where we only need the change `RCTAppDelegate -> EXAppDelegateWrapper` in AppDelegate.h. however, integrate RCTAppDelegate comes with some issues from expo-modules-core. [this commit](https://github.com/expo/expo/pull/20470/commits/2959477c5782f5d3ef770fbe72b04c1770bc566b) changes many code and i'll try to explain here: - RCTAppDelegate is in `React-RCTAppDelegate` pod, which does not define module. we define module for it in our patch system in autolinking. - defines `RCT_NEW_ARCH_ENABLED` as RCTAppDelegate - in new architecture mode, RCTAppDelegate comes with [more cxx dependencies](https://github.com/facebook/react-native/blob/03b17d9af7e4e3ad3f9ec078b76d0ffa33a3290e/Libraries/AppDelegate/RCTAppDelegate.h#L12-L18) for fabric. that's why we should add more header search paths and also move to EXAppDelegateWrapper.mm. # Test Plan - [x] ci passed - [x] bare-expo build and launch - [x] bare-expo nightlies build and launch - [x] fabric-tester build and launch - [x] fabric-tester nighties build and launch (should apply [the patch to fabric-tester](https://gist.github.com/Kudo/417a5159cb01a400ecee22ad4985d287)) - [x] rn 0.71-rc4 project build and launch (could apply [the patches](https://gist.github.com/Kudo/7448c733f12e700c7fbed76251fa3553) for testing) - [x] rn 0.71-rc4 project (new architecture) build and launch ([this pr](https://github.com/facebook/react-native/pull/35661) for react-native is required) - [x] rn 0.71-rc4 project (use_frameworks!) build and launch
[ios] Update react-native to 0.69 for expo go (#17629)# Why upgrade react-native for sdk 46 # How - update our react-native fork - [android] add hermes-engine prebuilding. the main change
[ios] Update react-native to 0.69 for expo go (#17629)# Why upgrade react-native for sdk 46 # How - update our react-native fork - [android] add hermes-engine prebuilding. the main change is [here](https://github.com/expo/react-native/commit/8bb810c9860fc1e49d9f55bb3929ad0eb534f441). because in expo-go we are building react-native from source. in 0.69 it also means to build hermes from source. that will make our ci time more difficult. - [expo][android] add ReactNativeHostWrapper for 0.69 because `com.facebook.react.devsupport.interfaces.RedBoxHandler` package renaming. - update some expo modules to support 0.69 **TODO** `et update-rn` is not included in this pr. i will do it later and commit directly. because that includes mass changes and makes review very difficult. # Test Plan update react-native, react, in expo/expo and test NCL with android/ios unversioned expo go Co-authored-by: Tomasz Sapeta <[email protected]>
[autolinking] Set EXPO_CONFIGURATION_* flags for Swift compiler (#17378)# Why It turned out that `#if DEBUG` in Swift works only in some projects (especially in Expo Go and BareExpo) but the fla
[autolinking] Set EXPO_CONFIGURATION_* flags for Swift compiler (#17378)# Why It turned out that `#if DEBUG` in Swift works only in some projects (especially in Expo Go and BareExpo) but the flag might be unset depending on the build settings. Follow up #17331 Should help in fixing #17373 # How I'm introducing `EXPO_CONFIGURATION_DEBUG` and `EXPO_CONFIGURATION_RELEASE` Swift flags that will be added to project's build settings as part of the autolinking process. Then, we'll be able to safely use `#if EXPO_CONFIGURATION_DEBUG` in the modules providers and maybe also in some other places. # Test Plan - Running `pod install` in Expo Go and BareExpo properly added these flags to `OTHER_SWIFT_FLAGS` build setting - Confirmed that running `pod install` again doesn't necessarily save the project (incremental mode works as expected)
[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
[autolinking] Fix umbrella directory not found from use_frameworks! (#15773)# Why fix umbrella header not found from `use_frameworks!` because framework files will be copied into DerivedData fol
[autolinking] Fix umbrella directory not found from use_frameworks! (#15773)# Why fix umbrella header not found from `use_frameworks!` because framework files will be copied into DerivedData folder and the folder structure is different to CocoaPods header folders. fix #15749 # How instead of using custom modulemap with the `umbrella directory '../../Public/React-Core/React'`. this change further patch CocoaPods to generate umbrella header and modulemap file together with the public header files. # Test Plan - bare-expo ci passed - ``` expo init sdk44 # select bare yarn add file:/path/to/expo/expo/packages/expo-modules-autolinking add `use_frameworks!` in `ios/Podfile` expo run:ios ```
[autolinking] Patch react podspec for swift integration (#15299)# Why there are tons of mixing swift and objc issues in expo-modules-core. e.g. - `include of non-modular header inside framework
[autolinking] Patch react podspec for swift integration (#15299)# Why there are tons of mixing swift and objc issues in expo-modules-core. e.g. - `include of non-modular header inside framework module` when prebuild expo-modules-core - sometimes swift functions cannot be loaded if there are react types. the root cause is that clang doesn't generate submodules correctly. although clang can transform `#import <React/RCTBridge.h>` to `@import React.RCTBridge;`, clang cannot do it right as React.RCTBridge submodule doesn't exist. as swift only know modules, this will cause lots of problems when we use react types in swift. # How - patch `React-Core.podspec` with custom modulemap for clang to generate submodules correctly. (details in code comment) - replace original CocoaPods `PodTarget` monkey patch with `Sandbox`. this new approach can patch podspec on the fly. # Test Plan - CI passed - to further check what's the difference for the change, you can enable `BUILD_LIBRARY_FOR_DISTRIBUTION` for expo-modules-core pod project and check the swiftinterface for ExpoModulesCore. e.g. `/Users/kudo/Library/Developer/Xcode/DerivedData/BareExpo-brnnteedtepltiasryrqyexlvweu/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface` ```swift @_inheritsConvenienceInitializers @objc final public class ViewModuleWrapper : ExpoModulesCore.RCTViewManager { ``` before: it's `ExpoModulesCore.RCTViewManager` ```swift @_inheritsConvenienceInitializers @objc final public class ViewModuleWrapper : React.RCTViewManager { ``` after: it's `React.RCTViewManager`
[tools] Fix versioning C++ code on iOS (#15027)
[ios] TurboModule implementation of expo modules proxy (#14626)
[ios][autolinking] Move autolinking scripts from the adapter to expo-modules-core (#14046)