mobiler 0.18.0

Build mobile apps in Rust — one core, native UI on Android, iOS, and the web (CLI)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
name = "geolocation"
summary = "Device location → \"lat,lng\" (free); requests the location permission"

[android]
sources = ["android/GeolocationPlugin.kt"]
register = '"geolocation" to GeolocationPlugin(application)'
# Adding the plugin IS the opt-in, so these are injected (uncommented) at mobiler:permissions.
permissions = ["android.permission.ACCESS_FINE_LOCATION", "android.permission.ACCESS_COARSE_LOCATION"]

[ios]
sources = ["ios/GeolocationPlugin.swift"]
register = 'case "geolocation": return await GeolocationPlugin.handle(op: op, input: input)'

[ios.info_plist]
NSLocationWhenInUseUsageDescription = "Show your location in the app."