@transistorsoft/capacitor-background-geolocation 7.1.0 → 7.2.1
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/Package.swift +45 -0
- package/android/Package.swift +2 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.6.8/tslocationmanager-3.6.8.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.6.8/tslocationmanager-3.6.8.aar.md5 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.6.8/tslocationmanager-3.6.8.aar.sha1 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.6.8/tslocationmanager-3.6.8.aar.sha256 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.6.8/tslocationmanager-3.6.8.aar.sha512 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +1 -3
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.6.8/tslocationmanager-v21-3.6.8.aar +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.6.8/tslocationmanager-v21-3.6.8.aar.md5 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.6.8/tslocationmanager-v21-3.6.8.aar.sha1 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.6.8/tslocationmanager-v21-3.6.8.aar.sha256 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-v21/3.6.8/tslocationmanager-v21-3.6.8.aar.sha512 +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-v21/maven-metadata.xml +1 -3
- package/android/src/main/java/com/transistorsoft/bggeo/capacitor/BackgroundGeolocationPlugin.java +2 -5
- package/ios/Frameworks/TSLocationManager.xcframework/Info.plist +61 -0
- package/ios/Frameworks/TSLocationManager.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/_CodeSignature/CodeRequirements +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/_CodeSignature/CodeResources +2033 -0
- package/ios/Frameworks/TSLocationManager.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/SOMotionDetector.h +141 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSAuthorization.h +38 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSConfig.h +310 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSGeofence.h +54 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSGeofenceEvent.h +64 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSGeofenceManager.h +54 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSLocation.h +105 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSLocationManager.h +315 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Info.plist +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Miniball/Miniball.hpp +525 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/PrivacyInfo.xcprivacy +36 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/_CodeSignature/CodeRequirements +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/_CodeSignature/CodeResources +642 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64/TSLocationManager.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/SOMotionDetector.h +141 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorization.h +38 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSConfig.h +310 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofence.h +54 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofenceEvent.h +64 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofenceManager.h +54 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSLocation.h +105 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSLocationManager.h +315 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +50 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Miniball/Miniball.hpp +525 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/PrivacyInfo.xcprivacy +36 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/_CodeSignature/CodeRequirements +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/_CodeSignature/CodeResources +536 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/AtomicBoolean.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/ConfigModule.h +21 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/HttpRequest.h +21 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/HttpResponse.h +29 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/LocationManager.h +55 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/LogQuery.h +13 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/SOMotionDetector.h +141 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/SQLQuery.h +34 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSActivityChangeEvent.h +16 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorization.h +38 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorizationEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSCallback.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSConfig.h +310 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSConnectivityChangeEvent.h +17 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSCurrentPositionRequest.h +43 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSDeviceInfo.h +24 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSEnabledChangeEvent.h +15 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofence.h +54 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofenceEvent.h +64 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofenceManager.h +54 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSGeofencesChangeEvent.h +17 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSHeartbeatEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSHttpEvent.h +19 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSHttpService.h +58 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSLocation.h +105 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSLocationManager.h +315 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSPowerSaveChangeEvent.h +14 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSProviderChangeEvent.h +20 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSReachability.h +106 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSSchedule.h +40 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSScheduleEvent.h +18 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TSWatchPositionRequest.h +41 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Headers/TransistorAuthorizationToken.h +31 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Miniball/Miniball.hpp +525 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/Modules/module.modulemap +6 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/PrivacyInfo.xcprivacy +36 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +642 -0
- package/ios/Frameworks/TSLocationManager.xcframework/ios-arm64_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/Sources/BackgroundGeolocationPlugin/BackgroundGeolocationPlugin.swift +880 -0
- package/ios/Sources/BackgroundGeolocationPlugin/PrivacyInfo.xcprivacy +35 -0
- package/package.json +5 -5
- package/ios/Plugin/BackgroundGeolocationModule.h +0 -14
- package/ios/Plugin/BackgroundGeolocationModule.m +0 -694
- package/ios/Plugin/BackgroundGeolocationPlugin.h +0 -10
- package/ios/Plugin/BackgroundGeolocationPlugin.m +0 -66
- package/ios/Plugin/Info.plist +0 -24
|
@@ -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,105 @@
|
|
|
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
|
+
@property (nonatomic, readonly) NSNumber *age;
|
|
36
|
+
/**
|
|
37
|
+
* The type of location: MOTIONCHANGE|TRACKING|CURRENT|SAMPLE|WATCH|GEOFENCE|HEARTBEAT
|
|
38
|
+
*/
|
|
39
|
+
@property (nonatomic, readonly) enum tsLocationType type;
|
|
40
|
+
/**
|
|
41
|
+
* YES when location was recorded while device is in motion; NO otherwise.
|
|
42
|
+
*/
|
|
43
|
+
@property (nonatomic, readonly) BOOL isMoving;
|
|
44
|
+
/**
|
|
45
|
+
* Arbitrary extras data attached to the location.
|
|
46
|
+
*/
|
|
47
|
+
@property (nonatomic, readonly) NSDictionary* extras;
|
|
48
|
+
/**
|
|
49
|
+
* For internal use only. Geofence data rendered to NSDictionary for posting to server.
|
|
50
|
+
*/
|
|
51
|
+
@property (nonatomic, readonly) NSDictionary* geofence;
|
|
52
|
+
// Battery
|
|
53
|
+
/**
|
|
54
|
+
* YES when device is plugged into power and charging
|
|
55
|
+
*/
|
|
56
|
+
@property (nonatomic, readonly) BOOL batteryIsCharging;
|
|
57
|
+
/**
|
|
58
|
+
* The battery level between 0 (empty) and 1 (full)
|
|
59
|
+
*/
|
|
60
|
+
@property (nonatomic, readonly) NSNumber *batteryLevel;
|
|
61
|
+
// Activity
|
|
62
|
+
/**
|
|
63
|
+
* Activity type rendered as string: still|on_foot|in_vehicle|running|on_bicycle
|
|
64
|
+
*/
|
|
65
|
+
@property (nonatomic, readonly) NSString *activityType;
|
|
66
|
+
/**
|
|
67
|
+
* Confidence of activity-type estimation as % 0-100
|
|
68
|
+
*/
|
|
69
|
+
@property (nonatomic, readonly) NSNumber *activityConfidence;
|
|
70
|
+
// State
|
|
71
|
+
/**
|
|
72
|
+
* YES when recorded location is a sample. The plugin records multiple locations for particular events, such as "motionchange" in order to determine
|
|
73
|
+
* highest accuracy location before persisting that location to the database and POSTing to your configured #url. Location "samples" are not persisted
|
|
74
|
+
* to the plugin's database, nor are they posted to your configured #url
|
|
75
|
+
*/
|
|
76
|
+
@property (nonatomic, readonly) BOOL isSample;
|
|
77
|
+
|
|
78
|
+
@property (nonatomic, readonly) BOOL mock;
|
|
79
|
+
/**
|
|
80
|
+
* YES when this location was provided to a heartbeat event
|
|
81
|
+
*/
|
|
82
|
+
@property (nonatomic, readonly) BOOL isHeartbeat;
|
|
83
|
+
/**
|
|
84
|
+
* The current value of the odometer in meters
|
|
85
|
+
*/
|
|
86
|
+
@property (nonatomic, readonly) NSNumber *odometer;
|
|
87
|
+
/**
|
|
88
|
+
* The event associated with this location: location|motionchange|heartbeat|providerchange
|
|
89
|
+
*/
|
|
90
|
+
@property (nonatomic, readonly) NSString *event;
|
|
91
|
+
|
|
92
|
+
-(instancetype) initWithLocation:(CLLocation*)location;
|
|
93
|
+
-(instancetype) initWithLocation:(CLLocation*)location type:(enum tsLocationType)type extras:(NSDictionary*)extras;
|
|
94
|
+
-(instancetype) initWithLocation:(CLLocation*)location geofence:(NSDictionary*)geofenceData;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Render location-data as JSON string
|
|
98
|
+
*/
|
|
99
|
+
- (NSData*)toJson:(NSError**)error;
|
|
100
|
+
/**
|
|
101
|
+
* Render location-data as NSDictionary
|
|
102
|
+
*/
|
|
103
|
+
- (NSDictionary*)toDictionary;
|
|
104
|
+
|
|
105
|
+
@end
|
|
@@ -0,0 +1,315 @@
|
|
|
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 <TSLocationManager/TSSchedule.h>
|
|
7
|
+
#import <TSLocationManager/TSLocation.h>
|
|
8
|
+
#import <TSLocationManager/TSActivityChangeEvent.h>
|
|
9
|
+
#import <TSLocationManager/TSProviderChangeEvent.h>
|
|
10
|
+
#import <TSLocationManager/TSHttpEvent.h>
|
|
11
|
+
#import <TSLocationManager/TSHeartbeatEvent.h>
|
|
12
|
+
#import <TSLocationManager/TSScheduleEvent.h>
|
|
13
|
+
#import <TSLocationManager/TSGeofenceManager.h>
|
|
14
|
+
#import <TSLocationManager/TSGeofencesChangeEvent.h>
|
|
15
|
+
#import <TSLocationManager/TSPowerSaveChangeEvent.h>
|
|
16
|
+
#import <TSLocationManager/TSConnectivityChangeEvent.h>
|
|
17
|
+
#import <TSLocationManager/TSEnabledChangeEvent.h>
|
|
18
|
+
#import <TSLocationManager/TSGeofenceEvent.h>
|
|
19
|
+
#import <TSLocationManager/TSAuthorizationEvent.h>
|
|
20
|
+
#import <TSLocationManager/TSGeofence.h>
|
|
21
|
+
#import <TSLocationManager/LocationManager.h>
|
|
22
|
+
#import <TSLocationManager/TSConfig.h>
|
|
23
|
+
#import <TSLocationManager/TSCurrentPositionRequest.h>
|
|
24
|
+
#import <TSLocationManager/TSWatchPositionRequest.h>
|
|
25
|
+
#import <TSLocationManager/LogQuery.h>
|
|
26
|
+
#import <TSLocationManager/TSDeviceInfo.h>
|
|
27
|
+
#import <TSLocationManager/TSAuthorization.h>
|
|
28
|
+
#import <TSLocationManager/TSHttpService.h>
|
|
29
|
+
#import <TSLocationManager/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 (atomic, readonly) BOOL enabled;
|
|
44
|
+
/// :nodoc:
|
|
45
|
+
@property (atomic, readonly) BOOL isConfigured;
|
|
46
|
+
/// :nodoc:
|
|
47
|
+
@property (atomic, readonly) BOOL isDebuggingMotionDetection;
|
|
48
|
+
/// :nodoc:
|
|
49
|
+
@property (atomic, readonly) BOOL isUpdatingLocation;
|
|
50
|
+
/// :nodoc:
|
|
51
|
+
@property (atomic, readonly) BOOL isRequestingLocation;
|
|
52
|
+
/// :nodoc:
|
|
53
|
+
@property (atomic, readonly) BOOL isMonitoringSignificantLocationChanges;
|
|
54
|
+
/// :nodoc:
|
|
55
|
+
@property (atomic, readonly) NSDate *suspendedAt;
|
|
56
|
+
/// `YES` when the the app was launched in the background.
|
|
57
|
+
@property (atomic, readonly) BOOL isLaunchedInBackground;
|
|
58
|
+
|
|
59
|
+
// LocationManagers
|
|
60
|
+
|
|
61
|
+
/// The SDK's `CLLocationManager` instance.
|
|
62
|
+
@property (nonatomic, strong, readonly) CLLocationManager *locationManager;
|
|
63
|
+
|
|
64
|
+
@property (atomic) CLLocationDistance distanceFilter;
|
|
65
|
+
|
|
66
|
+
/// :nodoc:
|
|
67
|
+
@property (nonatomic, strong, readonly) LocationManager *currentPositionManager;
|
|
68
|
+
/// :nodoc:
|
|
69
|
+
@property (nonatomic, strong, readonly) LocationManager *watchPositionManager;
|
|
70
|
+
/// :nodoc:
|
|
71
|
+
@property (nonatomic, strong, readonly) LocationManager *stateManager;
|
|
72
|
+
|
|
73
|
+
// Location Resources
|
|
74
|
+
|
|
75
|
+
/// The location used to monitor the SDK's stationary geofence.
|
|
76
|
+
@property (atomic, strong, readonly) CLLocation *stationaryLocation;
|
|
77
|
+
/// The last known location.
|
|
78
|
+
@property (atomic, strong, readonly) CLLocation *lastLocation;
|
|
79
|
+
/// :nodoc:
|
|
80
|
+
@property (atomic, strong, readonly) CLLocation *lastGoodLocation;
|
|
81
|
+
/// :nodoc:
|
|
82
|
+
@property (atomic, strong, readonly) CLLocation *lastOdometerLocation;
|
|
83
|
+
|
|
84
|
+
// GeofeneManager
|
|
85
|
+
|
|
86
|
+
/// :nodoc:
|
|
87
|
+
@property (nonatomic, strong, readonly) TSGeofenceManager *geofenceManager;
|
|
88
|
+
|
|
89
|
+
/// The application's `ViewController` instance. Used for presenting dialogs.
|
|
90
|
+
@property (nonatomic) UIViewController* viewController;
|
|
91
|
+
/// :nodoc:
|
|
92
|
+
@property (atomic) NSDate *stoppedAt;
|
|
93
|
+
/// :nodoc:
|
|
94
|
+
@property (atomic) UIBackgroundTaskIdentifier preventSuspendTask;
|
|
95
|
+
/// :nodoc:
|
|
96
|
+
@property (atomic, readonly) BOOL clientReady;
|
|
97
|
+
/// :nodoc:
|
|
98
|
+
@property (atomic, readonly) BOOL isAcquiringState;
|
|
99
|
+
/// :nodoc:
|
|
100
|
+
@property (atomic, readonly) BOOL wasAcquiringState;
|
|
101
|
+
/// :nodoc:
|
|
102
|
+
@property (atomic, readonly) BOOL isAcquiringBackgroundTime;
|
|
103
|
+
/// :nodoc:
|
|
104
|
+
@property (atomic, readonly) BOOL isAcquiringStationaryLocation;
|
|
105
|
+
/// :nodoc:
|
|
106
|
+
@property (atomic, readonly) BOOL isAcquiringSpeed;
|
|
107
|
+
/// :nodoc:
|
|
108
|
+
@property (atomic, readonly) BOOL isHeartbeatEnabled;
|
|
109
|
+
|
|
110
|
+
// Events listeners
|
|
111
|
+
/// :nodoc:
|
|
112
|
+
@property (atomic, readonly) NSMutableSet *currentPositionRequests;
|
|
113
|
+
/// :nodoc:
|
|
114
|
+
@property (atomic, readonly) NSMutableArray *watchPositionRequests;
|
|
115
|
+
/// :nodoc:
|
|
116
|
+
@property (atomic, readonly) NSMutableSet *locationListeners;
|
|
117
|
+
/// :nodoc:
|
|
118
|
+
@property (atomic, readonly) NSMutableSet *motionChangeListeners;
|
|
119
|
+
/// :nodoc:
|
|
120
|
+
@property (atomic, readonly) NSMutableSet *activityChangeListeners;
|
|
121
|
+
/// :nodoc:
|
|
122
|
+
@property (atomic, readonly) NSMutableSet *providerChangeListeners;
|
|
123
|
+
/// :nodoc:
|
|
124
|
+
@property (atomic, readonly) NSMutableSet *httpListeners;
|
|
125
|
+
/// :nodoc:
|
|
126
|
+
@property (atomic, readonly) NSMutableSet *scheduleListeners;
|
|
127
|
+
/// :nodoc:
|
|
128
|
+
@property (atomic, readonly) NSMutableSet *heartbeatListeners;
|
|
129
|
+
/// :nodoc:
|
|
130
|
+
@property (atomic, readonly) NSMutableSet *powerSaveChangeListeners;
|
|
131
|
+
/// :nodoc:
|
|
132
|
+
@property (atomic, readonly) NSMutableSet *enabledChangeListeners;
|
|
133
|
+
|
|
134
|
+
/// [Optional] User-supplied block to render location-data for SQLite database / Firebase adapter INSERT.
|
|
135
|
+
@property (copy) NSDictionary* (^beforeInsertBlock) (TSLocation *location);
|
|
136
|
+
|
|
137
|
+
/// Callback for requestPermission.
|
|
138
|
+
/// :nodoc:
|
|
139
|
+
@property (atomic) TSCallback *requestPermissionCallback;
|
|
140
|
+
|
|
141
|
+
/// Event Queue
|
|
142
|
+
/// :nodoc:
|
|
143
|
+
@property (atomic, readonly) NSMutableSet *eventQueue;
|
|
144
|
+
/// :nodoc:
|
|
145
|
+
@property (atomic) SOMotionType currentMotionType;
|
|
146
|
+
|
|
147
|
+
/// Returns the API's singleton instance.
|
|
148
|
+
+ (TSLocationManager *)sharedInstance;
|
|
149
|
+
|
|
150
|
+
#pragma mark - Event Listener Methods
|
|
151
|
+
|
|
152
|
+
/*
|
|
153
|
+
Adds a location event-listener.
|
|
154
|
+
*/
|
|
155
|
+
- (void) onLocation:(void(^)(TSLocation* location))success failure:(void(^)(NSError*))failure;
|
|
156
|
+
- (void) onHttp:(void(^)(TSHttpEvent* event))success;
|
|
157
|
+
- (void) onGeofence:(void(^)(TSGeofenceEvent* event))success;
|
|
158
|
+
- (void) onHeartbeat:(void(^)(TSHeartbeatEvent* event))success;
|
|
159
|
+
- (void) onMotionChange:(void(^)(TSLocation* event))success;
|
|
160
|
+
- (void) onActivityChange:(void(^)(TSActivityChangeEvent* event))success;
|
|
161
|
+
- (void) onProviderChange:(void(^)(TSProviderChangeEvent* event))success;
|
|
162
|
+
- (void) onGeofencesChange:(void(^)(TSGeofencesChangeEvent* event))success;
|
|
163
|
+
- (void) onSchedule:(void(^)(TSScheduleEvent* event))success;
|
|
164
|
+
- (void) onPowerSaveChange:(void(^)(TSPowerSaveChangeEvent* event))success;
|
|
165
|
+
- (void) onConnectivityChange:(void(^)(TSConnectivityChangeEvent* event))succes;
|
|
166
|
+
- (void) onEnabledChange:(void(^)(TSEnabledChangeEvent* event))success;
|
|
167
|
+
- (void) onAuthorization:(void(^)(TSAuthorizationEvent*))callback;
|
|
168
|
+
|
|
169
|
+
- (void) removeListener:(NSString*)event callback:(void(^)(id))callback;
|
|
170
|
+
- (void) un:(NSString*)event callback:(void(^)(id))callback;
|
|
171
|
+
- (void) removeListeners:(NSString*)event;
|
|
172
|
+
- (void) removeListenersForEvent:(NSString*)event;
|
|
173
|
+
- (void) removeListeners;
|
|
174
|
+
|
|
175
|
+
#pragma mark - Core API Methods
|
|
176
|
+
|
|
177
|
+
- (void) configure:(NSDictionary*)params;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
Signal to the plugin that your app is launched and ready, proving the default [Config].
|
|
181
|
+
|
|
182
|
+
The supplied [Config] will be applied **only at first install** of your app — for every launch thereafter,
|
|
183
|
+
the plugin will automatically load its last-known configuration from persistent storage.
|
|
184
|
+
The plugin always remembers the configuration you apply to it.
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
```dart
|
|
188
|
+
BackgroundGeolocation.ready(Config(
|
|
189
|
+
desiredAccuracy: Config.DESIRED_ACCURACY_HIGH,
|
|
190
|
+
distanceFilter: 10,
|
|
191
|
+
stopOnTerminate: false,
|
|
192
|
+
startOnBoot: true,
|
|
193
|
+
url: 'http://your.server.com',
|
|
194
|
+
headers: {
|
|
195
|
+
'my-auth-token': 'secret-token'
|
|
196
|
+
}
|
|
197
|
+
)).then((State state) {
|
|
198
|
+
print('[ready] success: ${state}');
|
|
199
|
+
});
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**WARNING:** The **`#ready`** method only applies the supplied [Config] for the **first launch of the app** —
|
|
203
|
+
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.
|
|
204
|
+
|
|
205
|
+
### The `-[TSConfig reset]` method.
|
|
206
|
+
|
|
207
|
+
If you wish, you can use the `-[TSConfig reset]` method to reset all `TSConfig` options to documented default-values (with optional overrides):
|
|
208
|
+
|
|
209
|
+
```dart
|
|
210
|
+
|
|
211
|
+
BackgroundGeolocation.reset();
|
|
212
|
+
// Reset to documented default-values with overrides
|
|
213
|
+
BackgroundGeolocation.reset(Config(
|
|
214
|
+
distanceFilter: 10
|
|
215
|
+
));
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## [Config.reset]: true
|
|
219
|
+
|
|
220
|
+
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.
|
|
221
|
+
|
|
222
|
+
## Example
|
|
223
|
+
|
|
224
|
+
```dart
|
|
225
|
+
BackgroundGeolocation.ready(Config(
|
|
226
|
+
distanceFilter: 50
|
|
227
|
+
)).then((State state) {
|
|
228
|
+
print('[ready] - ${state}')
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
*/
|
|
232
|
+
- (void) ready;
|
|
233
|
+
- (void) start;
|
|
234
|
+
- (void) stop;
|
|
235
|
+
- (void) startSchedule;
|
|
236
|
+
- (void) stopSchedule;
|
|
237
|
+
- (void) startGeofences;
|
|
238
|
+
- (NSMutableDictionary*) getState;
|
|
239
|
+
|
|
240
|
+
#pragma mark - Geolocation Methods
|
|
241
|
+
|
|
242
|
+
- (void) changePace:(BOOL)value;
|
|
243
|
+
- (void) getCurrentPosition:(TSCurrentPositionRequest*)request;
|
|
244
|
+
- (void) setOdometer:(CLLocationDistance)odometer request:(TSCurrentPositionRequest*)request;
|
|
245
|
+
- (CLLocationDistance)getOdometer;
|
|
246
|
+
- (void) watchPosition:(TSWatchPositionRequest*)request;
|
|
247
|
+
- (void) stopWatchPosition;
|
|
248
|
+
- (NSDictionary*) getStationaryLocation;
|
|
249
|
+
- (TSProviderChangeEvent*) getProviderState;
|
|
250
|
+
- (void) requestPermission:(void(^)(NSNumber *status))success failure:(void(^)(NSNumber *status))failure;
|
|
251
|
+
- (void) requestTemporaryFullAccuracy:(NSString*)purpose success:(void(^)(NSInteger))success failure:(void(^)(NSError*))failure;
|
|
252
|
+
|
|
253
|
+
#pragma mark - HTTP & Persistence Methods
|
|
254
|
+
|
|
255
|
+
- (void) sync:(void(^)(NSArray* locations))success failure:(void(^)(NSError* error))failure;
|
|
256
|
+
- (void) getLocations:(void(^)(NSArray* locations))success failure:(void(^)(NSString* error))failure;
|
|
257
|
+
- (BOOL) clearDatabase;
|
|
258
|
+
- (BOOL) destroyLocations;
|
|
259
|
+
- (void) destroyLocations:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
260
|
+
- (void) destroyLocation:(NSString*)uuid;
|
|
261
|
+
- (void) destroyLocation:(NSString*)uuid success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
262
|
+
- (void) insertLocation:(NSDictionary*)params success:(void(^)(NSString* uuid))success failure:(void(^)(NSString* error))failure;
|
|
263
|
+
- (void) persistLocation:(TSLocation*)location;
|
|
264
|
+
- (int) getCount;
|
|
265
|
+
|
|
266
|
+
#pragma mark - Application Methods
|
|
267
|
+
|
|
268
|
+
- (UIBackgroundTaskIdentifier) createBackgroundTask;
|
|
269
|
+
- (void) stopBackgroundTask:(UIBackgroundTaskIdentifier)taskId;
|
|
270
|
+
- (BOOL) isPowerSaveMode;
|
|
271
|
+
|
|
272
|
+
#pragma mark - Logging & Debug Methods
|
|
273
|
+
|
|
274
|
+
- (void) getLog:(void(^)(NSString* log))success failure:(void(^)(NSString* error))failure;
|
|
275
|
+
- (void) getLog:(LogQuery*)query success:(void(^)(NSString* log))success failure:(void(^)(NSString* error))failure;
|
|
276
|
+
- (void) emailLog:(NSString*)email success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
277
|
+
- (void) emailLog:(NSString*)email query:(LogQuery*)query success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
278
|
+
- (void) uploadLog:(NSString*)url query:(LogQuery*)query success:(void(^)(void))success failure:(void(^)(NSString* error))failure;
|
|
279
|
+
|
|
280
|
+
- (BOOL) destroyLog;
|
|
281
|
+
- (void) setLogLevel:(TSLogLevel)level;
|
|
282
|
+
- (void) playSound:(SystemSoundID)soundId;
|
|
283
|
+
- (void) error:(UIBackgroundTaskIdentifier)taskId message:(NSString*)message;
|
|
284
|
+
- (void) log:(NSString*)level message:(NSString*)message;
|
|
285
|
+
#pragma mark - Geofencing Methods
|
|
286
|
+
|
|
287
|
+
- (void) addGeofence:(TSGeofence*)geofence success:(void (^)(void))success failure:(void (^)(NSString* error))failure;
|
|
288
|
+
- (void) addGeofences:(NSArray*)geofences success:(void (^)(void))success failure:(void (^)(NSString* error))failure;
|
|
289
|
+
- (void) removeGeofence:(NSString*)identifier success:(void (^)(void))success failure:(void (^)(NSString* error))failure;
|
|
290
|
+
- (void) removeGeofences:(NSArray*)identifiers success:(void (^)(void))success failure:(void (^)(NSString* error))failure;;
|
|
291
|
+
- (void) removeGeofences;
|
|
292
|
+
- (NSArray*) getGeofences;
|
|
293
|
+
- (void) getGeofences:(void (^)(NSArray*))success failure:(void (^)(NSString*))failure;
|
|
294
|
+
- (void) getGeofence:(NSString*)identifier success:(void (^)(TSGeofence*))success failure:(void (^)(NSString*))failure;
|
|
295
|
+
- (void) geofenceExists:(NSString*)identifier callback:(void (^)(BOOL))callback;
|
|
296
|
+
|
|
297
|
+
#pragma mark - Sensor Methods
|
|
298
|
+
|
|
299
|
+
-(BOOL) isMotionHardwareAvailable;
|
|
300
|
+
-(BOOL) isDeviceMotionAvailable;
|
|
301
|
+
-(BOOL) isAccelerometerAvailable;
|
|
302
|
+
-(BOOL) isGyroAvailable;
|
|
303
|
+
-(BOOL) isMagnetometerAvailable;
|
|
304
|
+
|
|
305
|
+
#pragma mark - Application life-cycle callbacks
|
|
306
|
+
|
|
307
|
+
- (void) onSuspend:(NSNotification *)notification;
|
|
308
|
+
- (void) onResume:(NSNotification *)notification;
|
|
309
|
+
- (void) onAppTerminate;
|
|
310
|
+
|
|
311
|
+
# pragma mark - Private Methods
|
|
312
|
+
/// :nodoc:
|
|
313
|
+
- (void) fireMotionActivityChangeEvent:(TSActivityChangeEvent*)event;
|
|
314
|
+
@end
|
|
315
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSPowerSaveChangeEvent.h
|
|
3
|
+
// TSLocationManager
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2017-09-18.
|
|
6
|
+
// Copyright © 2017 Transistor Software. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@interface TSPowerSaveChangeEvent : NSObject
|
|
10
|
+
|
|
11
|
+
@property (nonatomic, readonly) BOOL isPowerSaveMode;
|
|
12
|
+
|
|
13
|
+
@end
|
|
14
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSProviderChange.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 TSProviderChangeEvent : NSObject
|
|
10
|
+
|
|
11
|
+
@property (nonatomic, readonly) CLAuthorizationStatus status;
|
|
12
|
+
@property (nonatomic, readonly) NSInteger accuracyAuthorization;
|
|
13
|
+
@property (nonatomic, readonly) BOOL gps;
|
|
14
|
+
@property (nonatomic, readonly) BOOL network;
|
|
15
|
+
@property (nonatomic, readonly) BOOL enabled;
|
|
16
|
+
@property (nonatomic, readonly) CLLocationManager* manager;
|
|
17
|
+
|
|
18
|
+
-(id) initWithManager:(CLLocationManager*)manager status:(CLAuthorizationStatus)status authorizationRequest:(NSString*)authorizationRequest;
|
|
19
|
+
-(NSDictionary*) toDictionary;
|
|
20
|
+
@end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2011, Tony Million.
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
18
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
19
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
20
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
21
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
22
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
23
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
24
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
25
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
#import <Foundation/Foundation.h>
|
|
29
|
+
#import <SystemConfiguration/SystemConfiguration.h>
|
|
30
|
+
|
|
31
|
+
//! Project version number for MacOSReachability.
|
|
32
|
+
/// :nodoc:
|
|
33
|
+
FOUNDATION_EXPORT double ReachabilityVersionNumber;
|
|
34
|
+
|
|
35
|
+
//! Project version string for MacOSReachability.
|
|
36
|
+
/// :nodoc:
|
|
37
|
+
FOUNDATION_EXPORT const unsigned char ReachabilityVersionString[];
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X.
|
|
41
|
+
*
|
|
42
|
+
* @see http://nshipster.com/ns_enum-ns_options/
|
|
43
|
+
**/
|
|
44
|
+
#ifndef NS_ENUM
|
|
45
|
+
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
|
|
46
|
+
#endif
|
|
47
|
+
|
|
48
|
+
/// :nodoc:
|
|
49
|
+
extern NSString *const tsReachabilityChangedNotification;
|
|
50
|
+
|
|
51
|
+
typedef NS_ENUM(NSInteger, NetworkStatus) {
|
|
52
|
+
// Apple NetworkStatus Compatible Names.
|
|
53
|
+
NotReachable = 0,
|
|
54
|
+
ReachableViaWiFi = 2,
|
|
55
|
+
ReachableViaWWAN = 1
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/// :nodoc:
|
|
59
|
+
@class TSReachability;
|
|
60
|
+
|
|
61
|
+
typedef void (^NetworkReachable)(TSReachability * reachability);
|
|
62
|
+
typedef void (^NetworkUnreachable)(TSReachability * reachability);
|
|
63
|
+
typedef void (^NetworkReachability)(TSReachability * reachability, SCNetworkConnectionFlags flags);
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@interface TSReachability : NSObject
|
|
67
|
+
|
|
68
|
+
@property (nonatomic, copy) NetworkReachable reachableBlock;
|
|
69
|
+
@property (nonatomic, copy) NetworkUnreachable unreachableBlock;
|
|
70
|
+
@property (nonatomic, copy) NetworkReachability reachabilityBlock;
|
|
71
|
+
|
|
72
|
+
@property (nonatomic, assign) BOOL reachableOnWWAN;
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
+(instancetype)reachabilityWithHostname:(NSString*)hostname;
|
|
76
|
+
// This is identical to the function above, but is here to maintain
|
|
77
|
+
//compatibility with Apples original code. (see .m)
|
|
78
|
+
+(instancetype)reachabilityWithHostName:(NSString*)hostname;
|
|
79
|
+
+(instancetype)reachabilityForInternetConnection;
|
|
80
|
+
+(instancetype)reachabilityWithAddress:(void *)hostAddress;
|
|
81
|
+
+(instancetype)reachabilityForLocalWiFi;
|
|
82
|
+
|
|
83
|
+
-(instancetype)initWithReachabilityRef:(SCNetworkReachabilityRef)ref;
|
|
84
|
+
|
|
85
|
+
-(BOOL)startNotifier;
|
|
86
|
+
-(void)stopNotifier;
|
|
87
|
+
|
|
88
|
+
-(BOOL)isReachable;
|
|
89
|
+
-(BOOL)isReachableViaWWAN;
|
|
90
|
+
-(BOOL)isReachableViaWiFi;
|
|
91
|
+
|
|
92
|
+
// WWAN may be available, but not active until a connection has been established.
|
|
93
|
+
// WiFi may require a connection for VPN on Demand.
|
|
94
|
+
-(BOOL)isConnectionRequired; // Identical DDG variant.
|
|
95
|
+
-(BOOL)connectionRequired; // Apple's routine.
|
|
96
|
+
// Dynamic, on demand connection?
|
|
97
|
+
-(BOOL)isConnectionOnDemand;
|
|
98
|
+
// Is user intervention required?
|
|
99
|
+
-(BOOL)isInterventionRequired;
|
|
100
|
+
|
|
101
|
+
-(NetworkStatus)currentReachabilityStatus;
|
|
102
|
+
-(SCNetworkReachabilityFlags)reachabilityFlags;
|
|
103
|
+
-(NSString*)currentReachabilityString;
|
|
104
|
+
-(NSString*)currentReachabilityFlags;
|
|
105
|
+
|
|
106
|
+
@end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSSchedule.h
|
|
3
|
+
// BG Geo
|
|
4
|
+
//
|
|
5
|
+
// Created by Christopher Scott on 2016-04-25.
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
#import "TSConfig.h"
|
|
9
|
+
|
|
10
|
+
@interface TSSchedule : NSObject
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
@property (nonatomic) NSDateComponents* onTime;
|
|
15
|
+
@property (nonatomic) NSDate* onDate;
|
|
16
|
+
|
|
17
|
+
@property (nonatomic) NSDateComponents* offTime;
|
|
18
|
+
@property (nonatomic) NSDate* offDate;
|
|
19
|
+
@property (nonatomic) BOOL triggered;
|
|
20
|
+
@property (nonatomic) TSTrackingMode trackingMode;
|
|
21
|
+
|
|
22
|
+
@property (copy) void (^handlerBlock) (TSSchedule *schedule);
|
|
23
|
+
|
|
24
|
+
-(instancetype)initWithRecord:(NSString*)data andHandler:(void (^)(TSSchedule*))handler;
|
|
25
|
+
|
|
26
|
+
-(void)make:(NSDateComponents*)NSDateComponents;
|
|
27
|
+
-(BOOL)isNext:(NSDate*)now;
|
|
28
|
+
-(BOOL)isLiteralDate;
|
|
29
|
+
-(BOOL)hasDay:(NSInteger)day;
|
|
30
|
+
-(BOOL)startsBefore:(NSDate*)now;
|
|
31
|
+
-(BOOL)startsAfter:(NSDate*)now;
|
|
32
|
+
-(BOOL)endsBefore:(NSDate*)now;
|
|
33
|
+
-(BOOL)endsAfter:(NSDate*)now;
|
|
34
|
+
-(BOOL)expired;
|
|
35
|
+
-(void)trigger:(BOOL)enabled;
|
|
36
|
+
-(void)reset;
|
|
37
|
+
-(void)evaluate;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TSScheduleEvent.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 TSScheduleEvent : NSObject
|
|
11
|
+
|
|
12
|
+
@property (nonatomic, readonly) TSSchedule* schedule;
|
|
13
|
+
@property (nonatomic, readonly) NSDictionary* state;
|
|
14
|
+
|
|
15
|
+
-(id) initWithSchedule:(TSSchedule*)schedule state:(NSDictionary*)state;
|
|
16
|
+
|
|
17
|
+
@end
|
|
18
|
+
|