Skip to content

Commit

Permalink
WIP: Use turbo module for new package
Browse files Browse the repository at this point in the history
- Upgrade RN supabase todolist dependencies
  • Loading branch information
mugikhan committed Sep 24, 2024
1 parent e099cc8 commit f1ee1dc
Show file tree
Hide file tree
Showing 118 changed files with 3,713 additions and 7,025 deletions.
788 changes: 416 additions & 372 deletions demos/react-native-supabase-todolist/ios/Podfile.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"EX_DEV_CLIENT_NETWORK_INSPECTOR": "true",
"ios.deploymentTarget": "13.4",
"newArchEnabled": "false",
"apple.extraPods": "[]",
"apple.ccacheEnabled": "false",
"apple.privacyManifestAggregationEnabled": "true"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@
objects = {

/* Begin PBXBuildFile section */
0AE04C85DE1A5798B81097C5 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = B284FA24BD76960755859400 /* PrivacyInfo.xcprivacy */; };
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
96905EF65AED1B983A6B3ABC /* libPods-powersyncexample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-powersyncexample.a */; };
97B8215345EF828C1C5EC914 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 93312657BD0D98895E6D3150 /* PrivacyInfo.xcprivacy */; };
A24FC0CE0CE4428093C83AC5 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33F1C54A2ED04A2F95D9C243 /* noop-file.swift */; };
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
C1408C3E62F945858FB8A91E /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = A889260911634277B47B9615 /* noop-file.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0BCDCE9CAA284DE2BD125F8B /* powersyncexample-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "powersyncexample-Bridging-Header.h"; path = "powersyncexample/powersyncexample-Bridging-Header.h"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* powersyncexample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = powersyncexample.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = powersyncexample/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = powersyncexample/AppDelegate.mm; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = powersyncexample/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = powersyncexample/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = powersyncexample/main.m; sourceTree = "<group>"; };
33F1C54A2ED04A2F95D9C243 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "powersyncexample/noop-file.swift"; sourceTree = "<group>"; };
58EEBF8E8E6FB1BC6CAF49B5 /* libPods-powersyncexample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-powersyncexample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6C2E3173556A471DD304B334 /* Pods-powersyncexample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-powersyncexample.debug.xcconfig"; path = "Target Support Files/Pods-powersyncexample/Pods-powersyncexample.debug.xcconfig"; sourceTree = "<group>"; };
7A4D352CD337FB3A3BF06240 /* Pods-powersyncexample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-powersyncexample.release.xcconfig"; path = "Target Support Files/Pods-powersyncexample/Pods-powersyncexample.release.xcconfig"; sourceTree = "<group>"; };
93312657BD0D98895E6D3150 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = powersyncexample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
A889260911634277B47B9615 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "powersyncexample/noop-file.swift"; sourceTree = "<group>"; };
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = powersyncexample/SplashScreen.storyboard; sourceTree = "<group>"; };
B284FA24BD76960755859400 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = powersyncexample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
BE3FEE71380B474FA303C46B /* powersyncexample-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "powersyncexample-Bridging-Header.h"; path = "powersyncexample/powersyncexample-Bridging-Header.h"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-powersyncexample/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -59,9 +59,9 @@
13B07FB61A68108700A75B9A /* Info.plist */,
13B07FB71A68108700A75B9A /* main.m */,
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
A889260911634277B47B9615 /* noop-file.swift */,
0BCDCE9CAA284DE2BD125F8B /* powersyncexample-Bridging-Header.h */,
93312657BD0D98895E6D3150 /* PrivacyInfo.xcprivacy */,
33F1C54A2ED04A2F95D9C243 /* noop-file.swift */,
BE3FEE71380B474FA303C46B /* powersyncexample-Bridging-Header.h */,
B284FA24BD76960755859400 /* PrivacyInfo.xcprivacy */,
);
name = powersyncexample;
sourceTree = "<group>";
Expand Down Expand Up @@ -147,13 +147,13 @@
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "powersyncexample" */;
buildPhases = (
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
B641F8D4DC4D449C5C6C2006 /* [Expo] Configure project */,
EABF7D308841F5DDB078C476 /* [Expo] Configure project */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
7A95842ABA13BCA58401409B /* [CP] Embed Pods Frameworks */,
9EBA9503273FC550CFEAC221 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -203,7 +203,7 @@
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
97B8215345EF828C1C5EC914 /* PrivacyInfo.xcprivacy in Resources */,
0AE04C85DE1A5798B81097C5 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -247,26 +247,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
7A95842ABA13BCA58401409B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-powersyncexample/Pods-powersyncexample-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/powersync-sqlite-core/powersync-sqlite-core.framework/powersync-sqlite-core",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/powersync-sqlite-core.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-powersyncexample/Pods-powersyncexample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -329,7 +309,29 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-powersyncexample/Pods-powersyncexample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
B641F8D4DC4D449C5C6C2006 /* [Expo] Configure project */ = {
9EBA9503273FC550CFEAC221 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-powersyncexample/Pods-powersyncexample-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/op-sqlite/crsqlite.framework/crsqlite",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/powersync-sqlite-core/powersync-sqlite-core.framework/powersync-sqlite-core",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/crsqlite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/powersync-sqlite-core.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-powersyncexample/Pods-powersyncexample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
EABF7D308841F5DDB078C476 /* [Expo] Configure project */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -358,7 +360,7 @@
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */,
C1408C3E62F945858FB8A91E /* noop-file.swift in Sources */,
A24FC0CE0CE4428093C83AC5 /* noop-file.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -485,7 +487,7 @@
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
};
Expand Down Expand Up @@ -543,7 +545,7 @@
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export class System {
this.supabaseConnector = new SupabaseConnector(this);
this.storage = this.supabaseConnector.storage;
const factory = new OPSqliteOpenFactory({
dbFilename: 'powersync.db'
sqliteOptions: {
dbFilename: 'powersync.db'
},
});
this.powersync = new PowerSyncDatabase({ database: factory, schema: AppSchema });

Expand Down
29 changes: 19 additions & 10 deletions demos/react-native-supabase-todolist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,42 @@
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@expo/vector-icons": "^14.0.0",
"@op-engineering/op-sqlite": "^8.0.1",
"@expo/vector-icons": "^14.0.3",
"@journeyapps/react-native-quick-sqlite": "^1.3.0",
"@op-engineering/op-sqlite": "file:../../../../op-sqlite",
"@powersync/attachments": "workspace:*",
"@powersync/common": "workspace:*",
"@powersync/op-sqlite": "workspace:*",
"@powersync/react": "workspace:*",
"@powersync/react-native": "workspace:*",
"@powersync/op-sqlite": "workspace:*",
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/drawer": "^6.6.3",
"@react-navigation/native": "^6.0.0",
"@supabase/supabase-js": "^2.33.1",
"base64-arraybuffer": "^1.0.2",
"expo": "51.0.10",
"expo": "51.0.34",
"expo-build-properties": "~0.12.1",
"expo-camera": "~15.0.10",
"expo-camera": "~15.0.16",
"expo-constants": "~16.0.2",
"expo-crypto": "~13.0.2",
"expo-file-system": "^17.0.1",
"expo-linking": "~6.3.1",
"expo-router": "3.5.15",
"expo-router": "3.5.23",
"expo-secure-store": "~13.0.1",
"expo-splash-screen": "~0.27.4",
"expo-splash-screen": "~0.27.6",
"expo-status-bar": "~1.12.1",
"js-logger": "^1.6.1",
"lodash": "^4.17.21",
"metro": "~0.80.8",
"react": "18.2.0",
"react-native": "0.74.1",
"react-native": "0.74.5",
"react-native-elements": "^3.4.3",
"react-native-encrypted-storage": "^4.0.3",
"react-native-gesture-handler": "~2.16.2",
"react-native-prompt-android": "^1.1.0",
"react-native-reanimated": "~3.10.0",
"react-native-reanimated": "~3.15.0",
"react-native-reanimated-table": "^0.0.2",
"react-native-safe-area-context": "4.10.1",
"react-native-safe-area-context": "4.10.5",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "~3.31.1",
"react-native-vector-icons": "^10.0.0",
Expand All @@ -60,5 +60,14 @@
"prettier": "^3.2.5",
"typescript": "^5.3.3"
},
"op-sqlite": {
"sqlcipher": false,
"crsqlite": true,
"performanceMode": "2",
"iosSqlite": false,
"fts5": false,
"libsql": false,
"sqliteVec": false
},
"private": true
}
43 changes: 0 additions & 43 deletions packages/op-sqlite/.gitignore

This file was deleted.

Loading

0 comments on commit f1ee1dc

Please sign in to comment.