Skip to content

Commit bdbc7bc

Browse files
authored
MagicWeather: upgrade to React Native 0.85.3 (#1769)
## Summary - Upgrades the MagicWeather example app from React Native 0.83 → **0.85.3**, bumps `react-native-purchases` to `^10.1.0` and `react-native-safe-area-context` to `^5.7.0`, and aligns React + `@react-native/*` peer/dev deps to the 0.85.3 template. - Switches `jest.config.js` to the new mandatory `@react-native/jest-preset` (the bare `'react-native'` preset is removed in 0.85). Realigns `jest` / `@types/jest` to v29 to match the preset's bundled deps. - Lets `pod install` apply the legacy-architecture-removal flags RN 0.85 expects on the iOS app target (`-DRCT_REMOVE_LEGACY_ARCH=1` in `OTHER_CFLAGS`/`OTHER_CPLUSPLUSFLAGS`, `SWIFT_ENABLE_EXPLICIT_MODULES = NO`). - Pins the Android Gradle wrapper back to **9.3.1** (the version RN 0.85 ships with) — 9.4.1 bundles kotlin-stdlib 2.3.0 which can't be read by the Kotlin 2.1.20 compiler used to build the RN gradle plugin. No source-code changes were needed: nothing in `src/` used the APIs removed in 0.84/0.85 (`StyleSheet.absoluteFillObject`, `AccessibilityInfo.setAccessibilityFocus`, etc.), and the AppDelegate/MainActivity/MainApplication/Podfile already match the 0.85 template. ## Test plan - [x] `yarn install` clean - [x] `tsc --noEmit` passes - [x] `yarn test` passes (no tests defined) - [x] `bundle exec pod install` on a clean `ios/Pods` (uses prebuilt RNCore + Hermes V1 + PurchasesHybridCommon 18.4.0) - [x] iOS `xcodebuild ... -sdk iphonesimulator build` → **BUILD SUCCEEDED** - [x] `react-native bundle --platform ios` → bundles cleanly with Metro v0.84.4 - [x] Android `./gradlew :app:assembleDebug` → **BUILD SUCCESSFUL** - [x] Run on iOS simulator end-to-end - [ ] Run on Android emulator end-to-end 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent e92a790 commit bdbc7bc

5 files changed

Lines changed: 1039 additions & 1642 deletions

File tree

examples/MagicWeather/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

examples/MagicWeather/ios/MagicWeatherReactNative.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,18 @@
370370
);
371371
MTL_ENABLE_DEBUG_INFO = YES;
372372
ONLY_ACTIVE_ARCH = YES;
373+
OTHER_CFLAGS = (
374+
"$(inherited)",
375+
"-DRCT_REMOVE_LEGACY_ARCH=1",
376+
);
373377
OTHER_CPLUSPLUSFLAGS = (
374378
"$(OTHER_CFLAGS)",
375379
"-DFOLLY_NO_CONFIG",
376380
"-DFOLLY_MOBILE=1",
377381
"-DFOLLY_USE_LIBCPP=1",
378382
"-DFOLLY_CFG_NO_COROUTINES=1",
379383
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
384+
"-DRCT_REMOVE_LEGACY_ARCH=1",
380385
);
381386
OTHER_LDFLAGS = (
382387
"$(inherited)",
@@ -385,6 +390,7 @@
385390
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
386391
SDKROOT = iphoneos;
387392
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
393+
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
388394
USE_HERMES = true;
389395
};
390396
name = Debug;
@@ -442,20 +448,26 @@
442448
"\"$(inherited)\"",
443449
);
444450
MTL_ENABLE_DEBUG_INFO = NO;
451+
OTHER_CFLAGS = (
452+
"$(inherited)",
453+
"-DRCT_REMOVE_LEGACY_ARCH=1",
454+
);
445455
OTHER_CPLUSPLUSFLAGS = (
446456
"$(OTHER_CFLAGS)",
447457
"-DFOLLY_NO_CONFIG",
448458
"-DFOLLY_MOBILE=1",
449459
"-DFOLLY_USE_LIBCPP=1",
450460
"-DFOLLY_CFG_NO_COROUTINES=1",
451461
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
462+
"-DRCT_REMOVE_LEGACY_ARCH=1",
452463
);
453464
OTHER_LDFLAGS = (
454465
"$(inherited)",
455466
" ",
456467
);
457468
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
458469
SDKROOT = iphoneos;
470+
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
459471
USE_HERMES = true;
460472
VALIDATE_PRODUCT = YES;
461473
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
preset: 'react-native',
2+
preset: '@react-native/jest-preset',
33
};

examples/MagicWeather/package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,33 @@
1010
"test": "jest"
1111
},
1212
"dependencies": {
13-
"react": "19.2.0",
14-
"react-native": "^0.83.0",
15-
"react-native-purchases": "^9.6.10",
16-
"react-native-safe-area-context": "^5.6.2"
13+
"react": "19.2.6",
14+
"react-native": "0.85.3",
15+
"react-native-purchases": "^10.1.0",
16+
"react-native-safe-area-context": "^5.7.0"
1717
},
1818
"devDependencies": {
1919
"@babel/core": "^7.28.6",
2020
"@babel/preset-env": "^7.28.6",
2121
"@babel/runtime": "^7.28.6",
22-
"@react-native-community/cli": "^20.0.0",
23-
"@react-native-community/cli-platform-android": "^20.0.0",
24-
"@react-native-community/cli-platform-ios": "^20.0.0",
25-
"@react-native/babel-preset": "^0.83.0",
26-
"@react-native/eslint-config": "^0.83.0",
27-
"@react-native/metro-config": "^0.83.0",
28-
"@react-native/typescript-config": "^0.83.0",
29-
"@types/jest": "^30.0.0",
22+
"@react-native-community/cli": "20.1.3",
23+
"@react-native-community/cli-platform-android": "20.1.3",
24+
"@react-native-community/cli-platform-ios": "20.1.3",
25+
"@react-native/babel-preset": "0.85.3",
26+
"@react-native/eslint-config": "0.85.3",
27+
"@react-native/jest-preset": "0.85.3",
28+
"@react-native/metro-config": "0.85.3",
29+
"@react-native/typescript-config": "0.85.3",
30+
"@types/jest": "^29.5.13",
3031
"@types/react": "^19.2.0",
3132
"@types/react-test-renderer": "^19.1.0",
3233
"eslint": "^8.19.0",
33-
"jest": "^30.2.0",
34+
"jest": "^29.6.3",
3435
"prettier": "2.8.8",
35-
"react-test-renderer": "19.2.0",
36+
"react-test-renderer": "19.2.6",
3637
"typescript": "^5.8.3"
3738
},
3839
"engines": {
39-
"node": ">=20"
40+
"node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0"
4041
}
4142
}

0 commit comments

Comments
 (0)