Skip to content

[test] Capacitor Investigation Additions #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/neat-crabs-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@powersync/web': patch
---

Testing
2 changes: 2 additions & 0 deletions demos/example-capacitor/android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ android {

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-filesystem')
implementation project(':capacitor-share')
implementation project(':capacitor-splash-screen')

}
Expand Down
6 changes: 6 additions & 0 deletions demos/example-capacitor/android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../../../node_modules/@capacitor/android/capacitor')

include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../../../node_modules/@capacitor/filesystem/android')

include ':capacitor-share'
project(':capacitor-share').projectDir = new File('../../../node_modules/@capacitor/share/android')

include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../../../node_modules/@capacitor/splash-screen/android')
4 changes: 2 additions & 2 deletions demos/example-capacitor/ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 13;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
Expand All @@ -370,7 +370,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 13;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.powersync.example;
Expand Down
96 changes: 50 additions & 46 deletions demos/example-capacitor/ios/App/App/Info.plist
Original file line number Diff line number Diff line change
@@ -1,49 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>powersync-capacitor</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
</plist>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>powersync-capacitor</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true />
<key>NSDocumentsFolderUsageDescription</key>
<string>This app needs access to documents folder to save files</string>
<key>NSFileProviderDomainUsageDescription</key>
<string>This app needs access to manage files</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions demos/example-capacitor/ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../../../node_modules/@capacitor/ios'
pod 'CapacitorFilesystem', :path => '../../../../node_modules/@capacitor/filesystem'
pod 'CapacitorShare', :path => '../../../../node_modules/@capacitor/share'
pod 'CapacitorSplashScreen', :path => '../../../../node_modules/@capacitor/splash-screen'
end

Expand Down
28 changes: 20 additions & 8 deletions demos/example-capacitor/ios/App/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
PODS:
- Capacitor (6.0.0):
- Capacitor (6.2.1):
- CapacitorCordova
- CapacitorCordova (6.0.0)
- CapacitorSplashScreen (6.0.0):
- CapacitorCordova (6.2.1)
- CapacitorFilesystem (6.0.3):
- Capacitor
- CapacitorShare (6.0.3):
- Capacitor
- CapacitorSplashScreen (7.0.2):
- Capacitor

DEPENDENCIES:
- "Capacitor (from `../../../../node_modules/@capacitor/ios`)"
- "CapacitorCordova (from `../../../../node_modules/@capacitor/ios`)"
- "CapacitorFilesystem (from `../../../../node_modules/@capacitor/filesystem`)"
- "CapacitorShare (from `../../../../node_modules/@capacitor/share`)"
- "CapacitorSplashScreen (from `../../../../node_modules/@capacitor/splash-screen`)"

EXTERNAL SOURCES:
Capacitor:
:path: "../../../../node_modules/@capacitor/ios"
CapacitorCordova:
:path: "../../../../node_modules/@capacitor/ios"
CapacitorFilesystem:
:path: "../../../../node_modules/@capacitor/filesystem"
CapacitorShare:
:path: "../../../../node_modules/@capacitor/share"
CapacitorSplashScreen:
:path: "../../../../node_modules/@capacitor/splash-screen"

SPEC CHECKSUMS:
Capacitor: 559d073c4ca6c27f8e7002c807eea94c3ba435a9
CapacitorCordova: 8c4bfdf69368512e85b1d8b724dd7546abeb30af
CapacitorSplashScreen: 5431ab8d19c1c6e95777d53bfaa7a36a6c3d94c7
Capacitor: 1e0d0e7330dea9f983b50da737d8918abcf273f8
CapacitorCordova: 8d93e14982f440181be7304aa9559ca631d77fff
CapacitorFilesystem: fa3099b3c3aa43a1b51362d0c999301ab1a9a752
CapacitorShare: 7af6ca761ce62030e8e9fbd2eb82416f5ceced38
CapacitorSplashScreen: 8d6c8cb0542a8e81585c593815db8785ed8ce454

PODFILE CHECKSUM: 30a5df536d5e7830e635f84e1fe35fa438802eaa
PODFILE CHECKSUM: c1703336f990a4728e25eafbdd9992a7afc2008e

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
8 changes: 7 additions & 1 deletion demos/example-capacitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,27 @@
"dependencies": {
"@capacitor/android": "^6.0.0",
"@capacitor/core": "latest",
"@capacitor/filesystem": "^6.0.0",
"@capacitor/ios": "^6.0.0",
"@capacitor/share": "^6.0.0",
"@capacitor/splash-screen": "latest",
"@journeyapps/wa-sqlite": "^1.2.0",
"@mui/icons-material": "^7.3.1",
"@powersync/react": "workspace:*",
"@powersync/web": "workspace:*",
"@types/react-router-dom": "^5.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.0"
"react-router-dom": "^6.30.1",
"react-window": "^1.8.11"
},
"devDependencies": {
"@capacitor/cli": "^6.0.0",
"@swc/core": "~1.6.0",
"@types/node": "^20.12.12",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@types/react-window": "^1.8.8",
"vite": "^5.2.11",
"vite-plugin-require": "^1.2.14",
"vite-plugin-top-level-await": "^1.4.1",
Expand Down
Loading