commit fa941eb8406a274ea2a59879f01c1237b1b6993f
parent a15b8afd6eeb97c3f89bae60b905d139c4c49b3d
Author: triesap <137732411+triesap@users.noreply.github.com>
Date: Tue, 27 Aug 2024 21:02:41 +0000
Add InfoPlist.xcstrings strings catalog, add current geolocation test method
Diffstat:
9 files changed, 90 insertions(+), 1 deletion(-)
diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle
@@ -10,6 +10,7 @@ android {
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-dialog')
+ implementation project(':capacitor-geolocation')
implementation project(':capacitor-preferences')
implementation project(':capacitor-splash-screen')
implementation project(':radroots-capacitor-sqlite')
diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle
@@ -5,6 +5,9 @@ project(':capacitor-android').projectDir = new File('../../../node_modules/.pnpm
include ':capacitor-dialog'
project(':capacitor-dialog').projectDir = new File('../../../node_modules/.pnpm/@capacitor+dialog@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/dialog/android')
+include ':capacitor-geolocation'
+project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/geolocation/android')
+
include ':capacitor-preferences'
project(':capacitor-preferences').projectDir = new File('../../../node_modules/.pnpm/@capacitor+preferences@6.0.2_@capacitor+core@6.1.2/node_modules/@capacitor/preferences/android')
diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj
@@ -15,6 +15,7 @@
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
+ C10403EA2C7E724D00A34E6D /* InfoPlist.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = C10403E92C7E724D00A34E6D /* InfoPlist.xcstrings */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -29,6 +30,7 @@
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
+ C10403E92C7E724D00A34E6D /* InfoPlist.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = InfoPlist.xcstrings; sourceTree = "<group>"; };
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -55,6 +57,7 @@
504EC2FB1FED79650016851F = {
isa = PBXGroup;
children = (
+ C10403E92C7E724D00A34E6D /* InfoPlist.xcstrings */,
504EC3061FED79650016851F /* App */,
504EC3051FED79650016851F /* Products */,
7F8756D8B27F46E3366F6CEA /* Pods */,
@@ -162,6 +165,7 @@
504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
504EC30D1FED79650016851F /* Main.storyboard in Resources */,
+ C10403EA2C7E724D00A34E6D /* InfoPlist.xcstrings in Resources */,
2FAD9763203C412B000D30F8 /* config.xml in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist
@@ -2,6 +2,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>NSLocationWhenInUseUsageDescription</key>
+ <string>$(NSLocationWhenInUseUsageDescription)</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
diff --git a/ios/App/InfoPlist.xcstrings b/ios/App/InfoPlist.xcstrings
@@ -0,0 +1,41 @@
+{
+ "sourceLanguage" : "en",
+ "strings" : {
+ "CFBundleDisplayName" : {
+ "comment" : "Bundle display name",
+ "extractionState" : "extracted_with_value",
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "new",
+ "value" : "Radroots"
+ }
+ }
+ }
+ },
+ "CFBundleName" : {
+ "comment" : "Bundle name",
+ "extractionState" : "extracted_with_value",
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "new",
+ "value" : "App"
+ }
+ }
+ }
+ },
+ "NSLocationWhenInUseUsageDescription" : {
+ "extractionState" : "manual",
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Uses device GPS to read current location."
+ }
+ }
+ }
+ }
+ },
+ "version" : "1.0"
+}
+\ No newline at end of file
diff --git a/ios/App/Podfile b/ios/App/Podfile
@@ -12,6 +12,7 @@ def capacitor_pods
pod 'Capacitor', :path => '../../../../node_modules/.pnpm/@capacitor+ios@6.1.2_@capacitor+core@6.1.2/node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../../../node_modules/.pnpm/@capacitor+ios@6.1.2_@capacitor+core@6.1.2/node_modules/@capacitor/ios'
pod 'CapacitorDialog', :path => '../../../../node_modules/.pnpm/@capacitor+dialog@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/dialog'
+ pod 'CapacitorGeolocation', :path => '../../../../node_modules/.pnpm/@capacitor+geolocation@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/geolocation'
pod 'CapacitorPreferences', :path => '../../../../node_modules/.pnpm/@capacitor+preferences@6.0.2_@capacitor+core@6.1.2/node_modules/@capacitor/preferences'
pod 'CapacitorSplashScreen', :path => '../../../../node_modules/.pnpm/@capacitor+splash-screen@6.0.2_@capacitor+core@6.1.2/node_modules/@capacitor/splash-screen'
pod 'RadrootsCapacitorSqlite', :path => '../../../../packages/capacitor-sqlite'
diff --git a/ios/App/Podfile.lock b/ios/App/Podfile.lock
@@ -4,6 +4,8 @@ PODS:
- CapacitorCordova (6.1.2)
- CapacitorDialog (6.0.1):
- Capacitor
+ - CapacitorGeolocation (6.0.1):
+ - Capacitor
- CapacitorPreferences (6.0.2):
- Capacitor
- CapacitorSplashScreen (6.0.2):
@@ -27,6 +29,7 @@ DEPENDENCIES:
- "Capacitor (from `../../../../node_modules/.pnpm/@capacitor+ios@6.1.2_@capacitor+core@6.1.2/node_modules/@capacitor/ios`)"
- "CapacitorCordova (from `../../../../node_modules/.pnpm/@capacitor+ios@6.1.2_@capacitor+core@6.1.2/node_modules/@capacitor/ios`)"
- "CapacitorDialog (from `../../../../node_modules/.pnpm/@capacitor+dialog@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/dialog`)"
+ - "CapacitorGeolocation (from `../../../../node_modules/.pnpm/@capacitor+geolocation@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/geolocation`)"
- "CapacitorPreferences (from `../../../../node_modules/.pnpm/@capacitor+preferences@6.0.2_@capacitor+core@6.1.2/node_modules/@capacitor/preferences`)"
- "CapacitorSplashScreen (from `../../../../node_modules/.pnpm/@capacitor+splash-screen@6.0.2_@capacitor+core@6.1.2/node_modules/@capacitor/splash-screen`)"
- RadrootsCapacitorSecureStorage (from `../../../../packages/capacitor-secure-storage`)
@@ -45,6 +48,8 @@ EXTERNAL SOURCES:
:path: "../../../../node_modules/.pnpm/@capacitor+ios@6.1.2_@capacitor+core@6.1.2/node_modules/@capacitor/ios"
CapacitorDialog:
:path: "../../../../node_modules/.pnpm/@capacitor+dialog@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/dialog"
+ CapacitorGeolocation:
+ :path: "../../../../node_modules/.pnpm/@capacitor+geolocation@6.0.1_@capacitor+core@6.1.2/node_modules/@capacitor/geolocation"
CapacitorPreferences:
:path: "../../../../node_modules/.pnpm/@capacitor+preferences@6.0.2_@capacitor+core@6.1.2/node_modules/@capacitor/preferences"
CapacitorSplashScreen:
@@ -58,6 +63,7 @@ SPEC CHECKSUMS:
Capacitor: 679f9673fdf30597493a6362a5d5bf233d46abc2
CapacitorCordova: f48c89f96c319101cd2f0ce8a2b7449b5fb8b3dd
CapacitorDialog: ad752191fdb22a8d0ac199b0754b8a021d86dbf9
+ CapacitorGeolocation: 39dca51d755f08ed1d43e51be55291a402cdc64f
CapacitorPreferences: e8284bf740cf8c6d3f25409af3c01df87dfeb5a1
CapacitorSplashScreen: 250df9ef8014fac5c7c1fd231f0f8b1d8f0b5624
KeychainSwift: 4a71a45c802fd9e73906457c2dcbdbdc06c9419d
@@ -66,6 +72,6 @@ SPEC CHECKSUMS:
SQLCipher: 77fbe633cd84db04b07876dd50766b4924b57d61
ZIPFoundation: b8c29ea7ae353b309bc810586181fd073cb3312c
-PODFILE CHECKSUM: 02f2d73cce219aad5bc9f8b13e42eeca55d710ce
+PODFILE CHECKSUM: adef25b71a81718ce98042fd56c02057b582e57f
COCOAPODS: 1.15.2
diff --git a/package.json b/package.json
@@ -37,6 +37,7 @@
"@capacitor/android": "^6.0.0",
"@capacitor/core": "^6.1.2",
"@capacitor/dialog": "^6.0.0",
+ "@capacitor/geolocation": "^6.0.0",
"@capacitor/preferences": "^6.0.0",
"@capacitor/splash-screen": "^6.0.0",
"@capacitor/ios": "^6.0.0",
diff --git a/src/routes/(app)/settings/+page.svelte b/src/routes/(app)/settings/+page.svelte
@@ -177,6 +177,35 @@
args: {
layer: 1,
title: {
+ value: `Share`,
+ },
+ list: [
+ {
+ touch: {
+ label: {
+ left: [
+ {
+ value: `Geolocation Current`,
+ classes: `capitalize`,
+ },
+ ],
+ },
+ callback: async () => {
+ const pos = await cl.geo.current();
+ await cl.dialog.alert(JSON.stringify(pos));
+ },
+ },
+ },
+ ],
+ },
+ }}
+ />
+ <svelte:component
+ this={trellis}
+ basis={{
+ args: {
+ layer: 1,
+ title: {
value: `Haptics`,
},
list: [