Skip to content

Commit 19fe17a

Browse files
committed
RNW working.
1 parent 1b5828f commit 19fe17a

Some content is hidden

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

52 files changed

+144
-109
lines changed

demos/react-native-supabase-todolist/package.json

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,43 @@
1616
"@powersync/react": "workspace:*",
1717
"@powersync/react-native": "workspace:*",
1818
"@react-native-community/masked-view": "^0.1.11",
19-
"@react-navigation/drawer": "^6.6.3",
20-
"@react-navigation/native": "^6.0.0",
19+
"@react-navigation/drawer": "^7.1.1",
20+
"@react-navigation/native": "^7.0.14",
2121
"@rneui/base": "4.0.0-rc.8",
2222
"@rneui/themed": "4.0.0-rc.8",
2323
"@supabase/supabase-js": "~2.33.1",
2424
"base64-arraybuffer": "^1.0.2",
25-
"expo": "51.0.37",
26-
"expo-build-properties": "~0.12.1",
27-
"expo-camera": "~15.0.16",
28-
"expo-constants": "~16.0.2",
29-
"expo-crypto": "~13.0.2",
30-
"expo-file-system": "^17.0.1",
31-
"expo-linking": "~6.3.1",
32-
"expo-router": "3.5.23",
33-
"expo-secure-store": "~13.0.1",
34-
"expo-splash-screen": "~0.27.6",
35-
"expo-status-bar": "~1.12.1",
25+
"expo": "52.0.42",
26+
"expo-build-properties": "~0.13.2",
27+
"expo-camera": "~16.0.18",
28+
"expo-constants": "~17.0.8",
29+
"expo-crypto": "~14.0.2",
30+
"expo-file-system": "^18.0.12",
31+
"expo-linking": "~7.0.5",
32+
"expo-router": "4.0.20",
33+
"expo-secure-store": "~14.0.1",
34+
"expo-splash-screen": "~0.29.22",
35+
"expo-status-bar": "~2.0.1",
3636
"js-logger": "^1.6.1",
3737
"lodash": "^4.17.21",
38-
"metro": "~0.80.8",
39-
"react": "18.2.0",
40-
"react-native": "0.74.5",
38+
"react": "18.3.1",
39+
"react-native": "0.76.9",
4140
"react-native-encrypted-storage": "^4.0.3",
42-
"react-native-gesture-handler": "~2.16.2",
41+
"react-native-gesture-handler": "~2.20.2",
4342
"react-native-prompt-android": "^1.1.0",
44-
"react-native-reanimated": "~3.10.1",
43+
"react-native-reanimated": "~3.16.7",
4544
"react-native-reanimated-table": "^0.0.2",
46-
"react-native-safe-area-context": "4.10.5",
47-
"react-native-screens": "~3.31.1",
45+
"react-native-safe-area-context": "4.12.0",
46+
"react-native-screens": "~4.4.0",
4847
"react-navigation-stack": "^2.10.4"
4948
},
5049
"devDependencies": {
51-
"@babel/core": "^7.24.5",
50+
"@babel/core": "^7.26.10",
5251
"@babel/plugin-transform-async-generator-functions": "^7.23.9",
5352
"@babel/preset-env": "^7.23.9",
5453
"@types/lodash": "^4.14.202",
55-
"@types/react": "~18.2.79",
56-
"babel-preset-expo": "^11.0.5",
54+
"@types/react": "~18.3.18",
55+
"babel-preset-expo": "^12.0.10",
5756
"prettier": "^3.2.5",
5857
"typescript": "^5.3.3"
5958
},

demos/react-native-web-supabase-todolist/android/app/build.gradle

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ react {
2020
bundleCommand = "export:embed"
2121

2222
/* Folders */
23-
// The root of your project, i.e. where "package.json" lives. Default is '..'
24-
// root = file("../")
25-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
26-
// reactNativeDir = file("../node_modules/react-native")
27-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
28-
// codegenDir = file("../node_modules/@react-native/codegen")
23+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
24+
// root = file("../../")
25+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
26+
// reactNativeDir = file("../../node_modules/react-native")
27+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
28+
// codegenDir = file("../../node_modules/@react-native/codegen")
2929

3030
/* Variants */
3131
// The list of variants to that are debuggable. For those we're going to
@@ -57,6 +57,9 @@ react {
5757
//
5858
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5959
// hermesFlags = ["-O", "-output-source-map"]
60+
61+
/* Autolinking */
62+
autolinkLibrariesWithApp()
6063
}
6164

6265
/**
@@ -118,6 +121,9 @@ android {
118121
useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false)
119122
}
120123
}
124+
androidResources {
125+
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
126+
}
121127
}
122128

123129
// Apply static values from `gradle.properties` to the `android.packagingOptions`
@@ -168,6 +174,3 @@ dependencies {
168174
implementation jscFlavor
169175
}
170176
}
171-
172-
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
173-
applyNativeModulesAppBuildGradle(project)

demos/react-native-web-supabase-todolist/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
<data android:scheme="https"/>
1414
</intent>
1515
</queries>
16-
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme">
16+
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:fullBackupContent="@xml/secure_store_backup_rules" android:dataExtractionRules="@xml/secure_store_data_extraction_rules">
1717
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
1818
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
1919
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
20-
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/foo"/>
20+
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/b5a3e5ad-eb77-4296-a34e-9556dd7d6e05"/>
2121
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
2222
<intent-filter>
2323
<action android:name="android.intent.action.MAIN"/>
@@ -32,6 +32,5 @@
3232
<data android:scheme="exp+powersync-example"/>
3333
</intent-filter>
3434
</activity>
35-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
3635
</application>
3736
</manifest>

demos/react-native-web-supabase-todolist/android/app/src/main/java/com/powersync/example/MainActivity.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.powersync.example
2+
import expo.modules.splashscreen.SplashScreenManager
23

34
import android.os.Build
45
import android.os.Bundle
@@ -15,7 +16,10 @@ class MainActivity : ReactActivity() {
1516
// Set the theme to AppTheme BEFORE onCreate to support
1617
// coloring the background, status bar, and navigation bar.
1718
// This is required for expo-splash-screen.
18-
setTheme(R.style.AppTheme);
19+
// setTheme(R.style.AppTheme);
20+
// @generated begin expo-splashscreen - expo prebuild (DO NOT MODIFY) sync-f3ff59a738c56c9a6119210cb55f0b613eb8b6af
21+
SplashScreenManager.registerOnActivity(this)
22+
// @generated end expo-splashscreen
1923
super.onCreate(null)
2024
}
2125

demos/react-native-web-supabase-todolist/android/app/src/main/java/com/powersync/example/MainApplication.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.facebook.react.ReactPackage
1010
import com.facebook.react.ReactHost
1111
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1212
import com.facebook.react.defaults.DefaultReactNativeHost
13+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1314
import com.facebook.soloader.SoLoader
1415

1516
import expo.modules.ApplicationLifecycleDispatcher
@@ -21,9 +22,10 @@ class MainApplication : Application(), ReactApplication {
2122
this,
2223
object : DefaultReactNativeHost(this) {
2324
override fun getPackages(): List<ReactPackage> {
25+
val packages = PackageList(this).packages
2426
// Packages that cannot be autolinked yet can be added manually here, for example:
2527
// packages.add(new MyReactNativePackage());
26-
return PackageList(this).packages
28+
return packages
2729
}
2830

2931
override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry"
@@ -40,7 +42,7 @@ class MainApplication : Application(), ReactApplication {
4042

4143
override fun onCreate() {
4244
super.onCreate()
43-
SoLoader.init(this, false)
45+
SoLoader.init(this, OpenSourceMergedSoMapping)
4446
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4547
// If you opted-in for the New Architecture, we load the native entry point for this app.
4648
load()
5.96 KB
3.43 KB

0 commit comments

Comments
 (0)