Skip to content

Commit 5a6afb1

Browse files
authored
chore: rn 0.85 upgrade of SampleApp and rngh 3 support (#3629)
## 🎯 Goal This PR bumps our `SampleApp` to React Native 0.85 as well adding support for some major dependencies, such as: - `react-native-gesture-handler` - `3.0.0` - `react-native-reanimated` `4.4` ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android
1 parent 439776a commit 5a6afb1

42 files changed

Lines changed: 6393 additions & 8630 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.yarn/patches/expo-audio-npm-55.0.14-05ad820099.patch renamed to .yarn/patches/expo-audio-npm-56.0.11-1049fdcaa1.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/android/src/main/java/expo/modules/audio/AudioModule.kt b/android/src/main/java/expo/modules/audio/AudioModule.kt
2-
index 72a6e9e990bdc9bab549536981fc2e08eeb4837e..6e12fa5e4e17e39eeee171e265ba254f83991ef7 100644
2+
index 992239ba7631ce0c97c0b41c5fbf61cc842386fe..ebc0933beaf40414887ff634029ca8eb0d0558c9 100644
33
--- a/android/src/main/java/expo/modules/audio/AudioModule.kt
44
+++ b/android/src/main/java/expo/modules/audio/AudioModule.kt
5-
@@ -27,6 +27,9 @@ import androidx.media3.exoplayer.hls.HlsMediaSource
5+
@@ -28,6 +28,9 @@ import androidx.media3.exoplayer.hls.HlsMediaSource
66
import androidx.media3.exoplayer.smoothstreaming.SsMediaSource
77
import androidx.media3.exoplayer.source.MediaSource
88
import androidx.media3.exoplayer.source.ProgressiveMediaSource
@@ -12,7 +12,7 @@ index 72a6e9e990bdc9bab549536981fc2e08eeb4837e..6e12fa5e4e17e39eeee171e265ba254f
1212
import expo.modules.interfaces.permissions.Permissions
1313
import expo.modules.kotlin.Promise
1414
import expo.modules.kotlin.exception.Exceptions
15-
@@ -851,7 +854,12 @@ class AudioModule : Module() {
15+
@@ -931,7 +934,12 @@ class AudioModule : Module() {
1616
CONTENT_TYPE_SS -> SsMediaSource.Factory(factory)
1717
CONTENT_TYPE_DASH -> DashMediaSource.Factory(factory)
1818
CONTENT_TYPE_HLS -> HlsMediaSource.Factory(factory)
@@ -27,7 +27,7 @@ index 72a6e9e990bdc9bab549536981fc2e08eeb4837e..6e12fa5e4e17e39eeee171e265ba254f
2727
}.createMediaSource(mediaItem)
2828
}
2929
diff --git a/expo-module.config.json b/expo-module.config.json
30-
index 52e634b2b196055a6007d4a37d441670756f155a..9a131dd948d2eb5adf3cf9b759829a0e8fed15a1 100644
30+
index 9ee5fdcd7a6e698c8cdcf42ee137239220aec190..9a131dd948d2eb5adf3cf9b759829a0e8fed15a1 100644
3131
--- a/expo-module.config.json
3232
+++ b/expo-module.config.json
3333
@@ -4,12 +4,6 @@
@@ -38,7 +38,7 @@ index 52e634b2b196055a6007d4a37d441670756f155a..9a131dd948d2eb5adf3cf9b759829a0e
3838
- "publication": {
3939
- "groupId": "expo.modules.audio",
4040
- "artifactId": "expo.modules.audio",
41-
- "version": "55.0.14",
41+
- "version": "56.0.11",
4242
- "repository": "local-maven-repo"
4343
- }
4444
+ "modules": ["expo.modules.audio.AudioModule"]

examples/ExpoMessaging/app.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@
22
"expo": {
33
"name": "ExpoMessaging",
44
"slug": "ExpoMessaging",
5-
"privacy": "public",
65
"version": "1.0.0",
76
"orientation": "portrait",
87
"icon": "./assets/icon.png",
9-
"splash": {
10-
"image": "./assets/splash.png",
11-
"resizeMode": "contain",
12-
"backgroundColor": "#ffffff"
13-
},
14-
"newArchEnabled": true,
158
"updates": {
169
"fallbackToCacheTimeout": 0
1710
},
@@ -50,8 +43,16 @@
5043
"favicon": "./assets/favicon.png",
5144
"bundler": "metro"
5245
},
53-
"scheme": "ExpoMessaging",
46+
"scheme": "expomessaging",
5447
"plugins": [
48+
[
49+
"expo-splash-screen",
50+
{
51+
"image": "./assets/splash.png",
52+
"resizeMode": "contain",
53+
"backgroundColor": "#ffffff"
54+
}
55+
],
5556
[
5657
"expo-location",
5758
{

examples/ExpoMessaging/app/channel/[cid]/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React, { useContext, useEffect, useState } from 'react';
22

33
import { StyleSheet, View } from 'react-native';
44

5-
import { useHeaderHeight } from '@react-navigation/elements';
65
import { Stack, useLocalSearchParams, useRouter } from 'expo-router';
6+
import { useHeaderHeight } from 'expo-router/react-navigation';
77
import type { Channel as StreamChatChannel } from 'stream-chat';
88
import {
99
Channel,

examples/ExpoMessaging/app/channel/[cid]/thread/[cid]/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useContext } from 'react';
22
import { Platform } from 'react-native';
33

4-
import { useHeaderHeight } from '@react-navigation/elements';
54
import { Stack } from 'expo-router';
5+
import { useHeaderHeight } from 'expo-router/react-navigation';
66
import { Channel, Thread } from 'stream-chat-expo';
77

88
import { AppContext } from '../../../../../context/AppContext';

examples/ExpoMessaging/components/ChatWrapper.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,17 @@ export const ChatWrapper = ({ children }: PropsWithChildren) => {
5454

5555
return (
5656
<WithComponents overrides={componentOverrides}>
57-
<OverlayProvider i18nInstance={streami18n} value={{ style: theme }}>
58-
<Chat client={chatClient} i18nInstance={streami18n} enableOfflineSupport>
57+
<OverlayProvider
58+
accessibility={{ enabled: true }}
59+
i18nInstance={streami18n}
60+
value={{ style: theme }}
61+
>
62+
<Chat
63+
client={chatClient}
64+
i18nInstance={streami18n}
65+
enableOfflineSupport
66+
useNativeMultipartUpload
67+
>
5968
{children}
6069
</Chat>
6170
</OverlayProvider>

examples/ExpoMessaging/package.json

Lines changed: 51 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,44 @@
1313
},
1414
"dependencies": {
1515
"@notifee/react-native": "^9.1.8",
16-
"@op-engineering/op-sqlite": "^15.2.7",
16+
"@op-engineering/op-sqlite": "^16.2.0",
1717
"@react-native-async-storage/async-storage": "2.2.0",
18-
"@react-native-community/netinfo": "11.5.2",
19-
"@react-native-firebase/app": "^23.4.0",
20-
"@react-native-firebase/messaging": "^23.4.0",
21-
"@react-navigation/elements": "^2.9.10",
22-
"@react-navigation/native": "^7.1.33",
23-
"@react-navigation/native-stack": "^7.14.5",
18+
"@react-native-community/netinfo": "12.0.1",
19+
"@react-native-firebase/app": "^24.0.0",
20+
"@react-native-firebase/messaging": "^24.0.0",
2421
"@shopify/flash-list": "^2.3.1",
25-
"expo": "^55.0.6",
26-
"expo-audio": "patch:expo-audio@npm%3A55.0.14#~/.yarn/patches/expo-audio-npm-55.0.14-05ad820099.patch",
27-
"expo-build-properties": "~55.0.9",
28-
"expo-clipboard": "~55.0.8",
29-
"expo-constants": "~55.0.7",
30-
"expo-document-picker": "~55.0.8",
31-
"expo-file-system": "~55.0.10",
32-
"expo-haptics": "~55.0.8",
33-
"expo-image-manipulator": "~55.0.10",
34-
"expo-image-picker": "~55.0.12",
35-
"expo-linking": "~55.0.7",
36-
"expo-location": "~55.1.2",
37-
"expo-media-library": "~55.0.9",
38-
"expo-router": "~55.0.5",
39-
"expo-sharing": "~55.0.11",
40-
"expo-splash-screen": "~55.0.10",
41-
"expo-status-bar": "~55.0.4",
42-
"expo-video": "~55.0.10",
43-
"react": "19.2.0",
44-
"react-dom": "19.2.0",
45-
"react-native": "0.83.2",
46-
"react-native-gesture-handler": "~2.30.0",
47-
"react-native-keyboard-controller": "1.20.7",
48-
"react-native-maps": "1.26.20",
49-
"react-native-reanimated": "4.2.1",
50-
"react-native-safe-area-context": "~5.6.2",
51-
"react-native-screens": "~4.23.0",
52-
"react-native-svg": "15.15.3",
22+
"expo": "^56.0.0",
23+
"expo-asset": "~56.0.0",
24+
"expo-audio": "patch:expo-audio@npm%3A56.0.11#~/.yarn/patches/expo-audio-npm-56.0.11-1049fdcaa1.patch",
25+
"expo-build-properties": "~56.0.0",
26+
"expo-clipboard": "~56.0.0",
27+
"expo-constants": "~56.0.0",
28+
"expo-document-picker": "~56.0.0",
29+
"expo-file-system": "~56.0.0",
30+
"expo-haptics": "~56.0.0",
31+
"expo-image-manipulator": "~56.0.0",
32+
"expo-image-picker": "~56.0.0",
33+
"expo-linking": "~56.0.0",
34+
"expo-location": "~56.0.0",
35+
"expo-media-library": "~56.0.0",
36+
"expo-router": "~56.2.8",
37+
"expo-sharing": "~56.0.0",
38+
"expo-splash-screen": "~56.0.0",
39+
"expo-status-bar": "~56.0.0",
40+
"expo-video": "~56.1.2",
41+
"react": "19.2.3",
42+
"react-dom": "19.2.3",
43+
"react-native": "0.85.3",
44+
"react-native-gesture-handler": "~2.31.1",
45+
"react-native-keyboard-controller": "1.21.6",
46+
"react-native-maps": "1.27.2",
47+
"react-native-reanimated": "4.3.1",
48+
"react-native-safe-area-context": "~5.7.0",
49+
"react-native-screens": "4.25.2",
50+
"react-native-svg": "15.15.4",
5351
"react-native-teleport": "^1.0.2",
5452
"react-native-web": "^0.21.0",
55-
"react-native-worklets": "0.7.2",
53+
"react-native-worklets": "0.8.3",
5654
"stream-chat": "^9.44.2",
5755
"stream-chat-expo": "workspace:^",
5856
"stream-chat-react-native-core": "workspace:^"
@@ -63,5 +61,22 @@
6361
"@types/react": "~19.2.10",
6462
"typescript": "~5.9.2"
6563
},
64+
"expo": {
65+
"install": {
66+
"exclude": [
67+
"@shopify/flash-list",
68+
"typescript"
69+
]
70+
},
71+
"doctor": {
72+
"reactNativeDirectoryCheck": {
73+
"exclude": [
74+
"@notifee/react-native",
75+
"expo-modules-jsi"
76+
],
77+
"listUnknownPackages": false
78+
}
79+
}
80+
},
6681
"private": true
6782
}

examples/SampleApp/Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ ruby ">= 2.6.10"
66
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
77
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
88
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9-
gem 'xcodeproj', '< 1.26.0'
10-
gem 'concurrent-ruby', '< 1.3.4'
119
gem 'fastlane'
10+
gem 'nkf'
1211
gem 'rubocop-performance'
1312
gem 'rubocop-require_tools'
1413
gem 'bigdecimal'

examples/SampleApp/Gemfile.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,15 @@ DEPENDENCIES
353353
benchmark
354354
bigdecimal
355355
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
356-
concurrent-ruby (< 1.3.4)
357356
fastlane
358357
fastlane-plugin-firebase_app_distribution
359358
fastlane-plugin-load_json
360359
fastlane-plugin-stream_actions (= 0.3.73)
361360
logger
362361
mutex_m
362+
nkf
363363
rubocop-performance
364364
rubocop-require_tools
365-
xcodeproj (< 1.26.0)
366365

367366
RUBY VERSION
368367
ruby 3.3.4p94

examples/SampleApp/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ dependencies {
135135
implementation jscFlavor
136136
}
137137

138-
implementation platform('com.google.firebase:firebase-bom:29.3.0')
138+
implementation platform('com.google.firebase:firebase-bom:34.13.0')
139139
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
140140

141141
// For React native video

examples/SampleApp/android/app/src/main/java/com/sampleapp/MainApplication.kt

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,20 @@ import com.facebook.react.PackageList
55
import com.facebook.react.ReactApplication
66
import com.facebook.react.ReactHost
77
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
8-
import com.facebook.react.ReactNativeHost
9-
import com.facebook.react.ReactPackage
108
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11-
import com.facebook.react.defaults.DefaultReactNativeHost
12-
13-
import com.facebook.react.ViewManagerOnDemandReactPackage
14-
import android.util.Log
15-
import com.facebook.react.bridge.ReactApplicationContext
16-
import com.facebook.react.bridge.ReactContext
17-
import com.facebook.react.ReactInstanceEventListener
189

1910
class MainApplication : Application(), ReactApplication {
2011

21-
override val reactNativeHost: ReactNativeHost =
22-
object : DefaultReactNativeHost(this) {
23-
override fun getPackages(): List<ReactPackage> =
12+
override val reactHost: ReactHost by lazy {
13+
getDefaultReactHost(
14+
context = applicationContext,
15+
packageList =
2416
PackageList(this).packages.apply {
2517
// Packages that cannot be autolinked yet can be added manually here, for example:
2618
// add(MyReactNativePackage())
27-
}
28-
29-
override fun getJSMainModuleName(): String = "index"
30-
31-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
32-
33-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
34-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
35-
}
36-
37-
override val reactHost: ReactHost
38-
get() = getDefaultReactHost(applicationContext, reactNativeHost)
19+
},
20+
)
21+
}
3922

4023
override fun onCreate() {
4124
super.onCreate()

0 commit comments

Comments
 (0)