Skip to content

Commit

Permalink
feat: Upgrade for Expo v52 compatibility (#183)
Browse files Browse the repository at this point in the history
* fix: remove obsolete plugins

* fix: fix variable assignment

Co-authored-by: Aiden Petersen <aiden.petersen@gmail.com>
  • Loading branch information
trevor-coleman and aiden-petersen authored Feb 6, 2025
1 parent b668ab0 commit 17d4511
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 163 deletions.
21 changes: 0 additions & 21 deletions apps/ExampleApp/app.config.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/ExampleApp/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@
"expo-build-properties",
{
"ios": {
"newArchEnabled": false,
"flipper": false,
"deploymentTarget": "15.1"
},
"android": {
"newArchEnabled": false,
"compileSdkVersion": 35
}
}
Expand Down
12 changes: 7 additions & 5 deletions apps/ExampleApp/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const config = {
}

interface AppProps {
hideSplashScreen: () => Promise<boolean>
hideSplashScreen: () => Promise<void>
}

/**
Expand All @@ -76,10 +76,12 @@ function App(props: AppProps) {
const { rehydrated } = useInitialRootStore(() => {
// This runs after the root store has been initialized and rehydrated.

// If your initialization scripts run very fast, it's good to show the splash screen for just a bit longer to prevent flicker.
// Slightly delaying splash screen hiding for better UX; can be customized or removed as needed,
// Note: (vanilla Android) The splash-screen will not appear if you launch your app via the terminal or Android Studio. Kill the app and launch it normally by tapping on the launcher icon. https://stackoverflow.com/a/69831106
// Note: (vanilla iOS) You might notice the splash-screen logo change size. This happens in debug/development mode. Try building the app for release.
// If your initialization scripts run very fast, it's good to show the splash screen for just a bit longer to
// prevent flicker. Slightly delaying splash screen hiding for better UX; can be customized or removed as needed,
// Note: (vanilla Android) The splash-screen will not appear if you launch your app via the terminal or Android
// Studio. Kill the app and launch it normally by tapping on the launcher icon.
// https://stackoverflow.com/a/69831106 Note: (vanilla iOS) You might notice the splash-screen logo change size.
// This happens in debug/development mode. Try building the app for release.
setTimeout(hideSplashScreen, 500)
})

Expand Down
1 change: 1 addition & 0 deletions apps/ExampleApp/app/screens/HomeScreen/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const HomeScreen: FC<HomeScreenProps> = observer(function HomeScreen() {
},
[navigation],
)

return (
<Screen style={$root} preset="fixed">
<View style={$shadowSpace}>
Expand Down
1 change: 1 addition & 0 deletions apps/ExampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"react": "18.3.1",
"react-dom": "^18.3.1",
"react-native": "^0.76.0",
"react-native-device-info": "^14.0.4",
"react-native-gesture-handler": "^2.20.0",
"react-native-reanimated": "^3.16.1",
"react-native-safe-area-context": "^4.12.0",
Expand Down
58 changes: 0 additions & 58 deletions apps/ExampleApp/plugins/withFlipperDisabled.ts

This file was deleted.

74 changes: 0 additions & 74 deletions apps/ExampleApp/plugins/withSplashScreen.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ struct RNMLKitRect: Record {
static func fromCGRect(rect: CGRect) -> RNMLKitRect {
var expoRect = RNMLKitRect()

var origin = RNMLKitPoint()
let origin = RNMLKitPoint()
origin.x = rect.origin.x
origin.y = rect.origin.y

var size = RNMLKitPoint()
let size = RNMLKitPoint()
size.x = rect.width
size.y = rect.height

Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11466,6 +11466,7 @@ __metadata:
react: 18.3.1
react-dom: ^18.3.1
react-native: ^0.76.0
react-native-device-info: ^14.0.4
react-native-gesture-handler: ^2.20.0
react-native-reanimated: ^3.16.1
react-native-safe-area-context: ^4.12.0
Expand Down Expand Up @@ -19035,6 +19036,15 @@ __metadata:
languageName: node
linkType: hard

"react-native-device-info@npm:^14.0.4":
version: 14.0.4
resolution: "react-native-device-info@npm:14.0.4"
peerDependencies:
react-native: "*"
checksum: aa839dbe7df1246a4b5f9bcfeb3d4cc4be585f13a0d3ff6a03f57a0c2cfe7590291ac292dda4c51fd8765f94c870857676463e8e2f1660b057f3ae2b4335db29
languageName: node
linkType: hard

"react-native-flipper@npm:^0.164.0":
version: 0.164.0
resolution: "react-native-flipper@npm:0.164.0"
Expand Down

0 comments on commit 17d4511

Please sign in to comment.