react-native-background-geolocation 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/stale.yml +41 -0
- package/CHANGELOG.md +1131 -0
- package/LICENSE +22 -0
- package/README.md +292 -0
- package/RNBackgroundGeolocation.podspec +27 -0
- package/android/.idea/compiler.xml +22 -0
- package/android/.idea/copyright/profiles_settings.xml +3 -0
- package/android/.idea/encodings.xml +6 -0
- package/android/.idea/gradle.xml +12 -0
- package/android/.idea/misc.xml +4 -0
- package/android/.idea/modules.xml +8 -0
- package/android/.idea/runConfigurations.xml +12 -0
- package/android/RNBackgroundGeolocation.iml +119 -0
- package/android/android.iml +20 -0
- package/android/app.gradle +22 -0
- package/android/build.gradle +62 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom +9 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.1.33/tslocationmanager-3.1.33.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +14 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom +9 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.33/tslocationmanager-reverse-3.1.33.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +14 -0
- package/android/proguard-rules.pro +30 -0
- package/android/react-native-background-geolocation-android.iml +229 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/HeadlessTask.java +171 -0
- package/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocation.java +33 -0
- package/android/src/main/java/com/transistorsoft/rnbackgroundgeolocation/RNBackgroundGeolocationModule.java +1261 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/ios/RNBackgroundGeolocation/RNBackgroundGeolocation.h +22 -0
- package/ios/RNBackgroundGeolocation/RNBackgroundGeolocation.m +754 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/Info.plist +57 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/SOMotionDetector.h +140 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSAuthorization.h +37 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSConfig.h +304 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofence.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofenceEvent.h +60 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofenceManager.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSLocation.h +101 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSLocationManager.h +312 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Info.plist +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/SOMotionDetector.h +140 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorization.h +37 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSConfig.h +304 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofence.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofenceEvent.h +60 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofenceManager.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSLocation.h +101 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSLocationManager.h +312 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +612 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/SOMotionDetector.h +140 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorization.h +37 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSConfig.h +304 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofence.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofenceEvent.h +60 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofenceManager.h +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSLocation.h +101 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSLocationManager.h +312 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +50 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.pbxproj +341 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/xcshareddata/RNBackgroundGeolocation.xccheckout +41 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/project.xcworkspace/xcuserdata/chris.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/Build.xcscheme +80 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/RNBackgroundGeolocation.xcscheme +113 -0
- package/ios/RNBackgroundGeolocation.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/xcschememanagement.plist +37 -0
- package/ios/RNBackgroundGeolocationTests/Info.plist +24 -0
- package/package.json +54 -0
- package/react-native.config.js +20 -0
- package/scripts/cp-declarations +53 -0
- package/scripts/declare-module +3 -0
- package/scripts/docs-index.html +4 -0
- package/scripts/generate-docs +23 -0
- package/scripts/postlink.js +146 -0
- package/scripts/postunlink.js +128 -0
- package/scripts/tsconfig.json +21 -0
- package/scripts/xcode-helpers.js +171 -0
- package/src/DeviceSettings.js +52 -0
- package/src/Events.js +17 -0
- package/src/Logger.js +90 -0
- package/src/NativeModule.js +528 -0
- package/src/TransistorAuthorizationToken.js +73 -0
- package/src/declarations/BackgroundGeolocation.d.ts +1601 -0
- package/src/declarations/interfaces/Authorization.d.ts +156 -0
- package/src/declarations/interfaces/AuthorizationEvent.d.ts +30 -0
- package/src/declarations/interfaces/Config.d.ts +2437 -0
- package/src/declarations/interfaces/ConnectivityChangeEvent.d.ts +18 -0
- package/src/declarations/interfaces/CurrentPositionRequest.d.ts +45 -0
- package/src/declarations/interfaces/DeviceInfo.d.ts +33 -0
- package/src/declarations/interfaces/DeviceSettings.d.ts +223 -0
- package/src/declarations/interfaces/Geofence.d.ts +255 -0
- package/src/declarations/interfaces/GeofenceEvent.d.ts +30 -0
- package/src/declarations/interfaces/GeofencesChangeEvent.d.ts +22 -0
- package/src/declarations/interfaces/HeartbeatEvent.d.ts +20 -0
- package/src/declarations/interfaces/HttpEvent.d.ts +313 -0
- package/src/declarations/interfaces/Location.d.ts +216 -0
- package/src/declarations/interfaces/LocationAuthorizationAlert.d.ts +41 -0
- package/src/declarations/interfaces/Logger.d.ts +359 -0
- package/src/declarations/interfaces/MotionActivityEvent.d.ts +31 -0
- package/src/declarations/interfaces/MotionChangeEvent.d.ts +15 -0
- package/src/declarations/interfaces/Notification.d.ts +484 -0
- package/src/declarations/interfaces/PermissionRationale.d.ts +31 -0
- package/src/declarations/interfaces/ProviderChangeEvent.d.ts +74 -0
- package/src/declarations/interfaces/SQLQuery.d.ts +60 -0
- package/src/declarations/interfaces/Sensors.d.ts +31 -0
- package/src/declarations/interfaces/State.d.ts +51 -0
- package/src/declarations/interfaces/TransistorAuthorizationToken.d.ts +63 -0
- package/src/declarations/interfaces/WatchPositionRequest.d.ts +45 -0
- package/src/declarations/types.d.ts +170 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +822 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSGeofence.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2016-12-21.
|
|
6
|
+
// Copyright © 2016 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@interface TSGeofence : NSObject
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
@property (nonatomic) NSString* identifier;
|
|
15
|
+
@property (nonatomic) CLLocationDistance radius;
|
|
16
|
+
|
|
17
|
+
@property (nonatomic) CLLocationDegrees latitude;
|
|
18
|
+
@property (nonatomic) CLLocationDegrees longitude;
|
|
19
|
+
@property (nonatomic) BOOL notifyOnEntry;
|
|
20
|
+
@property (nonatomic) BOOL notifyOnExit;
|
|
21
|
+
@property (nonatomic) BOOL notifyOnDwell;
|
|
22
|
+
@property (nonatomic) double loiteringDelay;
|
|
23
|
+
/**
|
|
24
|
+
* Arbitrary extra data attached to the geofence
|
|
25
|
+
*/
|
|
26
|
+
@property (nonatomic) NSDictionary *extras;
|
|
27
|
+
|
|
28
|
+
-(instancetype) initWithIdentifier:(NSString*)identifier
|
|
29
|
+
radius:(CLLocationDistance)radius
|
|
30
|
+
latitude:(CLLocationDegrees)latitude
|
|
31
|
+
longitude:(CLLocationDegrees)lontitude
|
|
32
|
+
notifyOnEntry:(BOOL)notifyOnEntry
|
|
33
|
+
notifyOnExit:(BOOL)notifyOnExit
|
|
34
|
+
notifyOnDwell:(BOOL)notifyOnDwell
|
|
35
|
+
loiteringDelay:(double)loiteringDelay;
|
|
36
|
+
|
|
37
|
+
-(instancetype) initWithIdentifier:(NSString*)identifier
|
|
38
|
+
radius:(CLLocationDistance)radius
|
|
39
|
+
latitude:(CLLocationDegrees)latitude
|
|
40
|
+
longitude:(CLLocationDegrees)longitude
|
|
41
|
+
notifyOnEntry:(BOOL)notifyOnEntry
|
|
42
|
+
notifyOnExit:(BOOL)notifyOnExit
|
|
43
|
+
notifyOnDwell:(BOOL)notifyOnDwell
|
|
44
|
+
loiteringDelay:(double)loiteringDelay
|
|
45
|
+
extras:(NSDictionary*)extras;
|
|
46
|
+
|
|
47
|
+
- (NSDictionary*) toDictionary;
|
|
48
|
+
|
|
49
|
+
@end
|
|
50
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSGeofenceEvent.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2017-03-27.
|
|
6
|
+
// Copyright © 2017 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "TSLocation.h"
|
|
11
|
+
#import "TSGeofence.h"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
The event object provided to `-[TSLocationManager onGeofence:]`
|
|
15
|
+
|
|
16
|
+
```obj-c
|
|
17
|
+
TSLocationManager *bgGeo = [TSLocationManager sharedInstance];
|
|
18
|
+
[bgGeo onGeofence:^(TSGeofenceEvent *event) {
|
|
19
|
+
NSLog(@"[onGeofence]: %@", event);
|
|
20
|
+
}];
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
@interface TSGeofenceEvent : NSObject
|
|
25
|
+
{
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// The location associated with this geofence event.
|
|
30
|
+
@property (nonatomic, readonly) TSLocation* location;
|
|
31
|
+
/// The triggered geofence
|
|
32
|
+
@property (nonatomic, readonly) TSGeofence* geofence;
|
|
33
|
+
/// The region instance.
|
|
34
|
+
@property (nonatomic, readonly) CLCircularRegion* region;
|
|
35
|
+
/// The geofence transition (eg: "ENTER", "EXIT", "DWELL"
|
|
36
|
+
@property (nonatomic, readonly) NSString* action;
|
|
37
|
+
/// :nodoc:
|
|
38
|
+
@property (nonatomic, readonly) BOOL isLoitering;
|
|
39
|
+
|
|
40
|
+
/// :nodoc:
|
|
41
|
+
@property (nonatomic, readonly) BOOL isFinishedLoitering;
|
|
42
|
+
|
|
43
|
+
/// :nodoc:
|
|
44
|
+
-(instancetype)initWithGeofence:(TSGeofence*)geofence region:(CLCircularRegion*)circularRegion action:(NSString*)actionName;
|
|
45
|
+
|
|
46
|
+
/// :nodoc:
|
|
47
|
+
-(void) startLoiteringAt:(CLLocation*)location callback:(void (^)(void))callback;
|
|
48
|
+
/// :nodoc:
|
|
49
|
+
-(BOOL) isLoiteringAt:(CLLocation*)location;
|
|
50
|
+
/// :nodoc:
|
|
51
|
+
-(void) setTriggerLocation:(CLLocation*)location;
|
|
52
|
+
/// :nodoc:
|
|
53
|
+
-(void) cancel;
|
|
54
|
+
|
|
55
|
+
/// Returns an `NSDictionary` representaton.
|
|
56
|
+
-(NSDictionary*)toDictionary;
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@end
|
|
60
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GeofenceManager.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2016-10-04.
|
|
6
|
+
// Copyright © 2016 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <CoreLocation/CoreLocation.h>
|
|
11
|
+
#import "TSGeofenceEvent.h"
|
|
12
|
+
#import "TSGeofencesChangeEvent.h"
|
|
13
|
+
|
|
14
|
+
extern NSString *const STATIONARY_REGION_IDENTIFIER;
|
|
15
|
+
|
|
16
|
+
@interface TSGeofenceManager : NSObject<CLLocationManagerDelegate>
|
|
17
|
+
{
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@property (copy) void (^onGeofence) (TSGeofenceEvent* event);
|
|
22
|
+
|
|
23
|
+
@property (nonatomic) BOOL isMoving;
|
|
24
|
+
@property (nonatomic) BOOL enabled;
|
|
25
|
+
@property (nonatomic) BOOL evaluated;
|
|
26
|
+
@property (nonatomic) BOOL isRequestingLocation;
|
|
27
|
+
@property (nonatomic) BOOL isMonitoringSignificantChanges;
|
|
28
|
+
@property (nonatomic) BOOL willEvaluateProximity;
|
|
29
|
+
@property (nonatomic) CLLocation *lastLocation;
|
|
30
|
+
|
|
31
|
+
@property (nonatomic, readonly) NSMutableArray *geofencesChangeListeners;
|
|
32
|
+
@property (nonatomic, readonly) NSMutableArray *geofenceListeners;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// Event listeners
|
|
36
|
+
-(void) onGeofencesChange:(void (^)(TSGeofencesChangeEvent*))success;
|
|
37
|
+
-(void) onGeofence:(void (^)(TSGeofenceEvent*))success;
|
|
38
|
+
-(void) un:(NSString*)event callback:(void(^)(id))callback;
|
|
39
|
+
-(void) removeListeners;
|
|
40
|
+
-(void) start;
|
|
41
|
+
-(void) stop;
|
|
42
|
+
-(void) ready;
|
|
43
|
+
-(void) setLocation:(CLLocation*)location isMoving:(BOOL)isMoving;
|
|
44
|
+
-(void) setProximityRadius:(CLLocationDistance)radius;
|
|
45
|
+
-(BOOL) isMonitoringRegion:(CLCircularRegion*)region;
|
|
46
|
+
-(void) didBecomeStationary:(CLLocation*)locaiton;
|
|
47
|
+
-(NSString*) identifierFor:(CLCircularRegion*)region;
|
|
48
|
+
-(void) create:(NSArray*)geofences success:(void (^)(void))success failure:(void (^)(NSString*))failure;
|
|
49
|
+
-(void) destroy:(NSArray*)identifiers success:(void (^)(void))success failure:(void (^)(NSString*))failure;
|
|
50
|
+
@end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSGeofencesChangeEvent.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2017-07-29.
|
|
6
|
+
// Copyright © 2017 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
#import "TSSchedule.h"
|
|
9
|
+
|
|
10
|
+
@interface TSGeofencesChangeEvent : NSObject
|
|
11
|
+
|
|
12
|
+
@property (nonatomic, readonly) NSArray* on;
|
|
13
|
+
@property (nonatomic, readonly) NSArray* off;
|
|
14
|
+
|
|
15
|
+
-(id) initWithOn:(NSArray*)on off:(NSArray*)off;
|
|
16
|
+
-(NSDictionary*) toDictionary;
|
|
17
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSHeartbeat.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2017-07-28.
|
|
6
|
+
// Copyright © 2017 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "TSLocation.h"
|
|
10
|
+
|
|
11
|
+
@interface TSHeartbeatEvent : NSObject
|
|
12
|
+
|
|
13
|
+
@property (nonatomic, readonly) TSLocation* location;
|
|
14
|
+
|
|
15
|
+
-(id) initWithLocation:(CLLocation*)location;
|
|
16
|
+
-(NSDictionary*) toDictionary;
|
|
17
|
+
@end
|
|
18
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSHttpResponse.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2017-07-28.
|
|
6
|
+
// Copyright © 2017 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@interface TSHttpEvent : NSObject
|
|
10
|
+
|
|
11
|
+
@property (nonatomic, readonly) BOOL isSuccess;
|
|
12
|
+
@property (nonatomic, readonly) NSInteger statusCode;
|
|
13
|
+
@property (nonatomic, readonly) NSDictionary *requestData;
|
|
14
|
+
@property (nonatomic, readonly) NSString *responseText;
|
|
15
|
+
@property (nonatomic, readonly) NSError *error;
|
|
16
|
+
|
|
17
|
+
-(id) initWithStatusCode:(NSInteger)statusCode requestData:(NSDictionary*)requestData responseData:(NSData*)responseData error:(NSError*)error;
|
|
18
|
+
-(NSDictionary*) toDictionary;
|
|
19
|
+
@end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSScheduler.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2016-04-26.
|
|
6
|
+
// Copyright © 2016 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
//
|
|
9
|
+
// TSScheduler
|
|
10
|
+
// TODO This should be decoupled into some sort of plugin
|
|
11
|
+
//
|
|
12
|
+
#import <Foundation/Foundation.h>
|
|
13
|
+
#import <UIKit/UIKit.h>
|
|
14
|
+
#import "TSConnectivityChangeEvent.h"
|
|
15
|
+
#import "TSAuthorizationEvent.h"
|
|
16
|
+
#import "AtomicBoolean.h"
|
|
17
|
+
#import "HttpRequest.h"
|
|
18
|
+
#import "TSReachability.h"
|
|
19
|
+
#import "TSCallback.h"
|
|
20
|
+
|
|
21
|
+
@class TSHttpService;
|
|
22
|
+
|
|
23
|
+
@interface TSHttpService : NSObject
|
|
24
|
+
|
|
25
|
+
#pragma mark - Singleton
|
|
26
|
+
+ (TSHttpService *)sharedInstance;
|
|
27
|
+
|
|
28
|
+
#pragma mark - Properties
|
|
29
|
+
|
|
30
|
+
@property (copy) void (^httpResponseBlock) (HttpRequest *request, HttpResponse *response);
|
|
31
|
+
|
|
32
|
+
@property (nonatomic) AtomicBoolean *isBusy;
|
|
33
|
+
@property (nonatomic) BOOL hasNetworkConnection;
|
|
34
|
+
|
|
35
|
+
@property (nonatomic, readonly) NSMutableArray *syncedRecords;
|
|
36
|
+
@property (nonatomic, readonly) TSReachability *reachability;
|
|
37
|
+
@property (nonatomic, readonly) UIBackgroundTaskIdentifier bgTask;
|
|
38
|
+
|
|
39
|
+
@property (nonatomic, readonly) NSMutableSet *connectivityChangeListeners;
|
|
40
|
+
@property (nonatomic, readonly) NSMutableSet *authorizationListeners;
|
|
41
|
+
|
|
42
|
+
@property (nonatomic) TSCallback *callback;
|
|
43
|
+
@property (nonatomic) long autoSyncThreshold;
|
|
44
|
+
|
|
45
|
+
#pragma mark - Methods
|
|
46
|
+
-(void)flush;
|
|
47
|
+
-(void)flush:(BOOL)overrideSyncThreshold;
|
|
48
|
+
-(void)flush:(void(^)(NSArray*))success failure:(void(^)(NSError*))failure;
|
|
49
|
+
-(void)startMonitoring;
|
|
50
|
+
-(void)stopMonitoring;
|
|
51
|
+
|
|
52
|
+
-(void)onConnectivityChange:(void (^)(TSConnectivityChangeEvent*))success;
|
|
53
|
+
-(void)onAuthorization:(void(^)(TSAuthorizationEvent*))callback;
|
|
54
|
+
-(void)un:(NSString*)event callback:(void(^)(id))callback;
|
|
55
|
+
-(void)removeListeners;
|
|
56
|
+
-(void)removeListeners:(NSString*)event;
|
|
57
|
+
|
|
58
|
+
@end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSLocation.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2017-02-11.
|
|
6
|
+
// Copyright © 2017 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@interface TSLocation : NSObject
|
|
10
|
+
|
|
11
|
+
// Location types
|
|
12
|
+
typedef enum tsLocationType : NSInteger {
|
|
13
|
+
TS_LOCATION_TYPE_MOTIONCHANGE = 0,
|
|
14
|
+
TS_LOCATION_TYPE_TRACKING = 1,
|
|
15
|
+
TS_LOCATION_TYPE_CURRENT = 2,
|
|
16
|
+
TS_LOCATION_TYPE_SAMPLE = 3,
|
|
17
|
+
TS_LOCATION_TYPE_WATCH = 4,
|
|
18
|
+
TS_LOCATION_TYPE_GEOFENCE = 5,
|
|
19
|
+
TS_LOCATION_TYPE_HEARTBEAT = 6
|
|
20
|
+
} tsLocationtype;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The native CLLocation instance
|
|
24
|
+
*/
|
|
25
|
+
@property (nonatomic, readonly) CLLocation* location;
|
|
26
|
+
/**
|
|
27
|
+
* Universally unique identifier. The uuid is used to locate the record in the database. It is also posted by default in HTTP requests so your server can determine if a duplicate location has been posted. It's also helpful to match a location received at your server to entries in the plugin logs.
|
|
28
|
+
*/
|
|
29
|
+
@property (nonatomic, readonly) NSString *uuid;
|
|
30
|
+
/**
|
|
31
|
+
* The rendered timestamp in ISO-8851 UTC format (YYYY-MM-dd HH:mm:sssZ)
|
|
32
|
+
*/
|
|
33
|
+
@property (nonatomic, readonly) NSString *timestamp;
|
|
34
|
+
/**
|
|
35
|
+
* The type of location: MOTIONCHANGE|TRACKING|CURRENT|SAMPLE|WATCH|GEOFENCE|HEARTBEAT
|
|
36
|
+
*/
|
|
37
|
+
@property (nonatomic, readonly) enum tsLocationType type;
|
|
38
|
+
/**
|
|
39
|
+
* YES when location was recorded while device is in motion; NO otherwise.
|
|
40
|
+
*/
|
|
41
|
+
@property (nonatomic, readonly) BOOL isMoving;
|
|
42
|
+
/**
|
|
43
|
+
* Arbitrary extras data attached to the location.
|
|
44
|
+
*/
|
|
45
|
+
@property (nonatomic, readonly) NSDictionary* extras;
|
|
46
|
+
/**
|
|
47
|
+
* For internal use only. Geofence data rendered to NSDictionary for posting to server.
|
|
48
|
+
*/
|
|
49
|
+
@property (nonatomic, readonly) NSDictionary* geofence;
|
|
50
|
+
// Battery
|
|
51
|
+
/**
|
|
52
|
+
* YES when device is plugged into power and charging
|
|
53
|
+
*/
|
|
54
|
+
@property (nonatomic, readonly) BOOL batteryIsCharging;
|
|
55
|
+
/**
|
|
56
|
+
* The battery level between 0 (empty) and 1 (full)
|
|
57
|
+
*/
|
|
58
|
+
@property (nonatomic, readonly) NSNumber *batteryLevel;
|
|
59
|
+
// Activity
|
|
60
|
+
/**
|
|
61
|
+
* Activity type rendered as string: still|on_foot|in_vehicle|running|on_bicycle
|
|
62
|
+
*/
|
|
63
|
+
@property (nonatomic, readonly) NSString *activityType;
|
|
64
|
+
/**
|
|
65
|
+
* Confidence of activity-type estimation as % 0-100
|
|
66
|
+
*/
|
|
67
|
+
@property (nonatomic, readonly) NSNumber *activityConfidence;
|
|
68
|
+
// State
|
|
69
|
+
/**
|
|
70
|
+
* YES when recorded location is a sample. The plugin records multiple locations for particular events, such as "motionchange" in order to determine
|
|
71
|
+
* highest accuracy location before persisting that location to the database and POSTing to your configured #url. Location "samples" are not persisted
|
|
72
|
+
* to the plugin's database, nor are they posted to your configured #url
|
|
73
|
+
*/
|
|
74
|
+
@property (nonatomic, readonly) BOOL isSample;
|
|
75
|
+
/**
|
|
76
|
+
* YES when this location was provided to a heartbeat event
|
|
77
|
+
*/
|
|
78
|
+
@property (nonatomic, readonly) BOOL isHeartbeat;
|
|
79
|
+
/**
|
|
80
|
+
* The current value of the odometer in meters
|
|
81
|
+
*/
|
|
82
|
+
@property (nonatomic, readonly) NSNumber *odometer;
|
|
83
|
+
/**
|
|
84
|
+
* The event associated with this location: location|motionchange|heartbeat|providerchange
|
|
85
|
+
*/
|
|
86
|
+
@property (nonatomic, readonly) NSString *event;
|
|
87
|
+
|
|
88
|
+
-(instancetype) initWithLocation:(CLLocation*)location;
|
|
89
|
+
-(instancetype) initWithLocation:(CLLocation*)location type:(enum tsLocationType)type extras:(NSDictionary*)extras;
|
|
90
|
+
-(instancetype) initWithLocation:(CLLocation*)location geofence:(NSDictionary*)geofenceData;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Render location-data as JSON string
|
|
94
|
+
*/
|
|
95
|
+
- (NSData*)toJson:(NSError**)error;
|
|
96
|
+
/**
|
|
97
|
+
* Render location-data as NSDictionary
|
|
98
|
+
*/
|
|
99
|
+
- (NSDictionary*)toDictionary;
|
|
100
|
+
|
|
101
|
+
@end
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <UIKit/UIKit.h>
|
|
3
|
+
#import <CoreData/CoreData.h>
|
|
4
|
+
#import <CoreLocation/CoreLocation.h>
|
|
5
|
+
#import <AudioToolbox/AudioToolbox.h>
|
|
6
|
+
#import "TSSchedule.h"
|
|
7
|
+
#import "TSLocation.h"
|
|
8
|
+
#import "TSActivityChangeEvent.h"
|
|
9
|
+
#import "TSProviderChangeEvent.h"
|
|
10
|
+
#import "TSHttpEvent.h"
|
|
11
|
+
#import "TSHeartbeatEvent.h"
|
|
12
|
+
#import "TSScheduleEvent.h"
|
|
13
|
+
#import "TSGeofenceManager.h"
|
|
14
|
+
#import "TSGeofencesChangeEvent.h"
|
|
15
|
+
#import "TSPowerSaveChangeEvent.h"
|
|
16
|
+
#import "TSConnectivityChangeEvent.h"
|
|
17
|
+
#import "TSEnabledChangeEvent.h"
|
|
18
|
+
#import "TSGeofenceEvent.h"
|
|
19
|
+
#import "TSAuthorizationEvent.h"
|
|
20
|
+
#import "TSGeofence.h"
|
|
21
|
+
#import "LocationManager.h"
|
|
22
|
+
#import "TSConfig.h"
|
|
23
|
+
#import "TSCurrentPositionRequest.h"
|
|
24
|
+
#import "TSWatchPositionRequest.h"
|
|
25
|
+
#import "LogQuery.h"
|
|
26
|
+
#import "TSDeviceInfo.h"
|
|
27
|
+
#import "TSAuthorization.h"
|
|
28
|
+
#import "TSHttpService.h"
|
|
29
|
+
#import "SOMotionDetector.h"
|
|
30
|
+
|
|
31
|
+
FOUNDATION_EXPORT double TSLocationManagerVersionNumber;
|
|
32
|
+
FOUNDATION_EXPORT const unsigned char TSLocationManagerVersionString[];
|
|
33
|
+
FOUNDATION_EXPORT NSString* TSLocationManagerVersion;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
The main API interface.
|
|
37
|
+
*/
|
|
38
|
+
@interface TSLocationManager : NSObject <CLLocationManagerDelegate>
|
|
39
|
+
|
|
40
|
+
#pragma mark - Properties
|
|
41
|
+
|
|
42
|
+
// Flags
|
|
43
|
+
@property (nonatomic, readonly) BOOL enabled;
|
|
44
|
+
/// :nodoc:
|
|
45
|
+
@property (nonatomic, readonly) BOOL isConfigured;
|
|
46
|
+
/// :nodoc:
|
|
47
|
+
@property (nonatomic, readonly) BOOL isDebuggingMotionDetection;
|
|
48
|
+
/// :nodoc:
|
|
49
|
+
@property (nonatomic, readonly) BOOL isUpdatingLocation;
|
|
50
|
+
/// :nodoc:
|
|
51
|
+
@property (nonatomic, readonly) BOOL isRequestingLocation;
|
|
52
|
+
/// :nodoc:
|
|
53
|
+
@property (nonatomic, readonly) BOOL isMonitoringSignificantLocationChanges;
|
|
54
|
+
/// :nodoc:
|
|
55
|
+
@property (nonatomic, readonly) NSDate *suspendedAt;
|
|
56
|
+
/// `YES` when the the app was launched in the background.
|
|
57
|
+
@property (nonatomic, readonly) BOOL isLaunchedInBackground;
|
|
58
|
+
|
|
59
|
+
// LocationManagers
|
|
60
|
+
|
|
61
|
+
/// The SDK's `CLLocationManager` instance.
|
|
62
|
+
@property (nonatomic, strong, readonly) CLLocationManager *locationManager;
|
|
63
|
+
/// :nodoc:
|
|
64
|
+
@property (nonatomic, strong, readonly) LocationManager *currentPositionManager;
|
|
65
|
+
/// :nodoc:
|
|
66
|
+
@property (nonatomic, strong, readonly) LocationManager *watchPositionManager;
|
|
67
|
+
/// :nodoc:
|
|
68
|
+
@property (nonatomic, strong, readonly) LocationManager *stateManager;
|
|
69
|
+
|
|
70
|
+
// Location Resources
|
|
71
|
+
|
|
72
|
+
/// The location used to monitor the SDK's stationary geofence.
|
|
73
|
+
@property (nonatomic, strong, readonly) CLLocation *stationaryLocation;
|
|
74
|
+
/// The last known location.
|
|
75
|
+
@property (nonatomic, strong, readonly) CLLocation *lastLocation;
|
|
76
|
+
/// :nodoc:
|
|
77
|
+
@property (nonatomic, strong, readonly) CLLocation *lastGoodLocation;
|
|
78
|
+
/// :nodoc:
|
|
79
|
+
@property (nonatomic, strong, readonly) CLLocation *lastOdometerLocation;
|
|
80
|
+
|
|
81
|
+
// GeofeneManager
|
|
82
|
+
|
|
83
|
+
/// :nodoc:
|
|
84
|
+
@property (nonatomic, strong, readonly) TSGeofenceManager *geofenceManager;
|
|
85
|
+
|
|
86
|
+
/// The application's `ViewController` instance. Used for presenting dialogs.
|
|
87
|
+
@property (nonatomic) UIViewController* viewController;
|
|
88
|
+
/// :nodoc:
|
|
89
|
+
@property (nonatomic) NSDate *stoppedAt;
|
|
90
|
+
/// :nodoc:
|
|
91
|
+
@property (nonatomic) UIBackgroundTaskIdentifier preventSuspendTask;
|
|
92
|
+
/// :nodoc:
|
|
93
|
+
@property (nonatomic, readonly) BOOL clientReady;
|
|
94
|
+
/// :nodoc:
|
|
95
|
+
@property (nonatomic, readonly) BOOL isAcquiringState;
|
|
96
|
+
/// :nodoc:
|
|
97
|
+
@property (nonatomic, readonly) BOOL wasAcquiringState;
|
|
98
|
+
/// :nodoc:
|
|
99
|
+
@property (nonatomic, readonly) BOOL isAcquiringBackgroundTime;
|
|
100
|
+
/// :nodoc:
|
|
101
|
+
@property (nonatomic, readonly) BOOL isAcquiringStationaryLocation;
|
|
102
|
+
/// :nodoc:
|
|
103
|
+
@property (nonatomic, readonly) BOOL isAcquiringSpeed;
|
|
104
|
+
/// :nodoc:
|
|
105
|
+
@property (nonatomic, readonly) BOOL isHeartbeatEnabled;
|
|
106
|
+
|
|
107
|
+
// Events listeners
|
|
108
|
+
/// :nodoc:
|
|
109
|
+
@property (nonatomic, readonly) NSMutableSet *currentPositionRequests;
|
|
110
|
+
/// :nodoc:
|
|
111
|
+
@property (nonatomic, readonly) NSMutableArray *watchPositionRequests;
|
|
112
|
+
/// :nodoc:
|
|
113
|
+
@property (nonatomic, readonly) NSMutableSet *locationListeners;
|
|
114
|
+
/// :nodoc:
|
|
115
|
+
@property (nonatomic, readonly) NSMutableSet *motionChangeListeners;
|
|
116
|
+
/// :nodoc:
|
|
117
|
+
@property (nonatomic, readonly) NSMutableSet *activityChangeListeners;
|
|
118
|
+
/// :nodoc:
|
|
119
|
+
@property (nonatomic, readonly) NSMutableSet *providerChangeListeners;
|
|
120
|
+
/// :nodoc:
|
|
121
|
+
@property (nonatomic, readonly) NSMutableSet *httpListeners;
|
|
122
|
+
/// :nodoc:
|
|
123
|
+
@property (nonatomic, readonly) NSMutableSet *scheduleListeners;
|
|
124
|
+
/// :nodoc:
|
|
125
|
+
@property (nonatomic, readonly) NSMutableSet *heartbeatListeners;
|
|
126
|
+
/// :nodoc:
|
|
127
|
+
@property (nonatomic, readonly) NSMutableSet *powerSaveChangeListeners;
|
|
128
|
+
/// :nodoc:
|
|
129
|
+
@property (nonatomic, readonly) NSMutableSet *enabledChangeListeners;
|
|
130
|
+
|
|
131
|
+
/// [Optional] User-supplied block to render location-data for SQLite database / Firebase adapter INSERT.
|
|
132
|
+
@property (copy) NSDictionary* (^beforeInsertBlock) (TSLocation *location);
|
|
133
|
+
|
|
134
|
+
/// Callback for requestPermission.
|
|
135
|
+
/// :nodoc:
|
|
136
|
+
@property (nonatomic) TSCallback *requestPermissionCallback;
|
|
137
|
+
|
|
138
|
+
/// Event Queue
|
|
139
|
+
/// :nodoc:
|
|
140
|
+
@property (nonatomic, readonly) NSMutableSet *eventQueue;
|
|
141
|
+
/// :nodoc:
|
|
142
|
+
@property (nonatomic) SOMotionType currentMotionType;
|
|
143
|
+
|
|
144
|
+
/// Returns the API's singleton instance.
|
|
145
|
+
+ (TSLocationManager *)sharedInstance;
|
|
146
|
+
|
|
147
|
+
#pragma mark - Event Listener Methods
|
|
148
|
+
|
|
149
|
+
/*
|
|
150
|
+
Adds a location event-listener.
|
|
151
|
+
*/
|
|
152
|
+
- (void) onLocation:(void(^)(TSLocation* location))success failure:(void(^)(NSError*))failure;
|
|
153
|
+
- (void) onHttp:(void(^)(TSHttpEvent* event))success;
|
|
154
|
+
- (void) onGeofence:(void(^)(TSGeofenceEvent* event))success;
|
|
155
|
+
- (void) onHeartbeat:(void(^)(TSHeartbeatEvent* event))success;
|
|
156
|
+
- (void) onMotionChange:(void(^)(TSLocation* event))success;
|
|
157
|
+
- (void) onActivityChange:(void(^)(TSActivityChangeEvent* event))success;
|
|
158
|
+
- (void) onProviderChange:(void(^)(TSProviderChangeEvent* event))success;
|
|
159
|
+
- (void) onGeofencesChange:(void(^)(TSGeofencesChangeEvent* event))success;
|
|
160
|
+
- (void) onSchedule:(void(^)(TSScheduleEvent* event))success;
|
|
161
|
+
- (void) onPowerSaveChange:(void(^)(TSPowerSaveChangeEvent* event))success;
|
|
162
|
+
- (void) onConnectivityChange:(void(^)(TSConnectivityChangeEvent* event))succes;
|
|
163
|
+
- (void) onEnabledChange:(void(^)(TSEnabledChangeEvent* event))success;
|
|
164
|
+
- (void) onAuthorization:(void(^)(TSAuthorizationEvent*))callback;
|
|
165
|
+
|
|
166
|
+
- (void) removeListener:(NSString*)event callback:(void(^)(id))callback;
|
|
167
|
+
- (void) un:(NSString*)event callback:(void(^)(id))callback;
|
|
168
|
+
- (void) removeListeners:(NSString*)event;
|
|
169
|
+
- (void) removeListenersForEvent:(NSString*)event;
|
|
170
|
+
- (void) removeListeners;
|
|
171
|
+
|
|
172
|
+
#pragma mark - Core API Methods
|
|
173
|
+
|
|
174
|
+
- (void) configure:(NSDictionary*)params;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
Signal to the plugin that your app is launched and ready, proving the default [Config].
|
|
178
|
+
|
|
179
|
+
The supplied [Config] will be applied **only at first install** of your app — for every launch thereafter,
|
|
180
|
+
the plugin will automatically load its last-known configuration from persistent storage.
|
|
181
|
+
The plugin always remembers the configuration you apply to it.
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
```dart
|
|
185
|
+
BackgroundGeolocation.ready(Config(
|
|
186
|
+
desiredAccuracy: Config.DESIRED_ACCURACY_HIGH,
|
|
187
|
+
distanceFilter: 10,
|
|
188
|
+
stopOnTerminate: false,
|
|
189
|
+
startOnBoot: true,
|
|
190
|
+
url: 'http://your.server.com',
|
|
191
|
+
headers: {
|
|
192
|
+
'my-auth-token': 'secret-token'
|
|
193
|
+
}
|
|
194
|
+
)).then((State state) {
|
|
195
|
+
print('[ready] success: ${state}');
|
|
196
|
+
});
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**WARNING:** The **`#ready`** method only applies the supplied [Config] for the **first launch of the app** —
|
|
200
|
+
Forever after, the plugin is going to remember **every configuration change** you apply at runtime (eg: [setConfig]) and reload that *same config* every time your app boots.
|
|
201
|
+
|
|
202
|
+
### The `-[TSConfig reset]` method.
|
|
203
|
+
|
|
204
|
+
If you wish, you can use the `-[TSConfig reset]` method to reset all `TSConfig` options to documented default-values (with optional overrides):
|
|
205
|
+
|
|
206
|
+
```dart
|
|
207
|
+
|
|
208
|
+
BackgroundGeolocation.reset();
|
|
209
|
+
// Reset to documented default-values with overrides
|
|
210
|
+
BackgroundGeolocation.reset(Config(
|
|
211
|
+
distanceFilter: 10
|
|
212
|
+
));
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## [Config.reset]: true
|
|
216
|
+
|
|
217
|
+
Optionally, you can set [Config.reset] to `true` This is helpful during development. This will essentially *force* the supplied [Config] to be applied with *each launch* of your application.
|
|
218
|
+
|
|
219
|
+
## Example
|
|
220
|
+
|
|
221
|
+
```dart
|
|
222
|
+
BackgroundGeolocation.ready(Config(
|
|
223
|
+
distanceFilter: 50
|
|
224
|
+
)).then((State state) {
|
|
225
|
+
print('[ready] - ${state}')
|
|
226
|
+
});
|
|
227
|
+
```
|
|
228
|
+
*/
|
|
229
|
+
- (void) ready;
|
|
230
|
+
- (void) start;
|
|
231
|
+
- (void) stop;
|
|
232
|
+
- (void) startSchedule;
|
|
233
|
+
- (void) stopSchedule;
|
|
234
|
+
- (void) startGeofences;
|
|
235
|
+
- (NSMutableDictionary*) getState;
|
|
236
|
+
|
|
237
|
+
#pragma mark - Geolocation Methods
|
|
238
|
+
|
|
239
|
+
- (void) changePace:(BOOL)value;
|
|
240
|
+
- (void) getCurrentPosition:(TSCurrentPositionRequest*)request;
|
|
241
|
+
- (void) setOdometer:(CLLocationDistance)odometer request:(TSCurrentPositionRequest*)request;
|
|
242
|
+
- (CLLocationDistance)getOdometer;
|
|
243
|
+
- (void) watchPosition:(TSWatchPositionRequest*)request;
|
|
244
|
+
- (void) stopWatchPosition;
|
|
245
|
+
- (NSDictionary*) getStationaryLocation;
|
|
246
|
+
- (TSProviderChangeEvent*) getProviderState;
|
|
247
|
+
- (void) requestPermission:(void(^)(NSNumber *status))success failure:(void(^)(NSNumber *status))failure;
|
|
248
|
+
- (void) requestTemporaryFullAccuracy:(NSString*)purpose success:(void(^)(NSInteger))success failure:(void(^)(NSError*))failure;
|
|
249
|
+
|
|
250
|
+
#pragma mark - HTTP & Persistence Methods
|
|
251
|
+
|
|
252
|
+
- (void) sync:(void(^)(NSArray* locations))success failure:(void(^)(NSError* error))failure;
|
|
253
|
+
- (void) getLocations:(void(^)(NSArray* locations))success failure:(void(^)(NSString* error))failure;
|
|
254
|
+
- (BOOL) clearDatabase;
|
|
255
|
+
- (BOOL) destroyLocations;
|
|
256
|
+
- (void) destroyLocations:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
257
|
+
- (void) destroyLocation:(NSString*)uuid;
|
|
258
|
+
- (void) destroyLocation:(NSString*)uuid success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
259
|
+
- (void) insertLocation:(NSDictionary*)params success:(void(^)(NSString* uuid))success failure:(void(^)(NSString* error))failure;
|
|
260
|
+
- (int) getCount;
|
|
261
|
+
|
|
262
|
+
#pragma mark - Application Methods
|
|
263
|
+
|
|
264
|
+
- (UIBackgroundTaskIdentifier) createBackgroundTask;
|
|
265
|
+
- (void) stopBackgroundTask:(UIBackgroundTaskIdentifier)taskId;
|
|
266
|
+
- (BOOL) isPowerSaveMode;
|
|
267
|
+
|
|
268
|
+
#pragma mark - Logging & Debug Methods
|
|
269
|
+
|
|
270
|
+
- (void) getLog:(void(^)(NSString* log))success failure:(void(^)(NSString* error))failure;
|
|
271
|
+
- (void) getLog:(LogQuery*)query success:(void(^)(NSString* log))success failure:(void(^)(NSString* error))failure;
|
|
272
|
+
- (void) emailLog:(NSString*)email success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
273
|
+
- (void) emailLog:(NSString*)email query:(LogQuery*)query success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
274
|
+
- (void) uploadLog:(NSString*)url query:(LogQuery*)query success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
275
|
+
|
|
276
|
+
- (BOOL) destroyLog;
|
|
277
|
+
- (void) setLogLevel:(TSLogLevel)level;
|
|
278
|
+
- (void) playSound:(SystemSoundID)soundId;
|
|
279
|
+
- (void) error:(UIBackgroundTaskIdentifier)taskId message:(NSString*)message;
|
|
280
|
+
- (void) log:(NSString*)level message:(NSString*)message;
|
|
281
|
+
#pragma mark - Geofencing Methods
|
|
282
|
+
|
|
283
|
+
- (void) addGeofence:(TSGeofence*)geofence success:(void (^)(void))success failure:(void (^)(NSString* error))failure;
|
|
284
|
+
- (void) addGeofences:(NSArray*)geofences success:(void (^)(void))success failure:(void (^)(NSString* error))failure;
|
|
285
|
+
- (void) removeGeofence:(NSString*)identifier success:(void (^)(void))success failure:(void (^)(NSString* error))failure;
|
|
286
|
+
- (void) removeGeofences:(NSArray*)identifiers success:(void (^)(void))success failure:(void (^)(NSString* error))failure;;
|
|
287
|
+
- (void) removeGeofences;
|
|
288
|
+
|
|
289
|
+
- (NSArray*) getGeofences;
|
|
290
|
+
- (void) getGeofences:(void (^)(NSArray*))success failure:(void (^)(NSString*))failure;
|
|
291
|
+
- (void) getGeofence:(NSString*)identifier success:(void (^)(TSGeofence*))success failure:(void (^)(NSString*))failure;
|
|
292
|
+
- (void) geofenceExists:(NSString*)identifier callback:(void (^)(BOOL))callback;
|
|
293
|
+
|
|
294
|
+
#pragma mark - Sensor Methods
|
|
295
|
+
|
|
296
|
+
-(BOOL) isMotionHardwareAvailable;
|
|
297
|
+
-(BOOL) isDeviceMotionAvailable;
|
|
298
|
+
-(BOOL) isAccelerometerAvailable;
|
|
299
|
+
-(BOOL) isGyroAvailable;
|
|
300
|
+
-(BOOL) isMagnetometerAvailable;
|
|
301
|
+
|
|
302
|
+
#pragma mark - Application life-cycle callbacks
|
|
303
|
+
|
|
304
|
+
- (void) onSuspend:(NSNotification *)notification;
|
|
305
|
+
- (void) onResume:(NSNotification *)notification;
|
|
306
|
+
- (void) onAppTerminate;
|
|
307
|
+
|
|
308
|
+
# pragma mark - Private Methods
|
|
309
|
+
/// :nodoc:
|
|
310
|
+
- (void) fireMotionActivityChangeEvent:(TSActivityChangeEvent*)event;
|
|
311
|
+
@end
|
|
312
|
+
|