├── .gitignore ├── ACKNOWLEDGEMENTS ├── CHANGELOG.md ├── EstimoteProximitySDK └── EstimoteProximitySDK.xcframework │ ├── Info.plist │ ├── ios-arm64 │ └── EstimoteProximitySDK.framework │ │ ├── EstimoteProximitySDK │ │ ├── Headers │ │ ├── EPXCloudCredentials.h │ │ ├── EPXProximityObserver.h │ │ ├── EPXProximityObserverConfiguration.h │ │ ├── EPXProximityRange.h │ │ ├── EPXProximityZone.h │ │ ├── EPXProximityZoneContext.h │ │ ├── EstimoteProximitySDK-Swift.h │ │ └── EstimoteProximitySDK.h │ │ ├── Info.plist │ │ ├── Modules │ │ ├── EstimoteProximitySDK.swiftmodule │ │ │ ├── arm64-apple-ios.abi.json │ │ │ ├── arm64-apple-ios.private.swiftinterface │ │ │ ├── arm64-apple-ios.swiftdoc │ │ │ └── arm64-apple-ios.swiftinterface │ │ └── module.modulemap │ │ └── PrivateHeaders │ │ ├── AnalyticsTrackEventAdapter_Bridge.h │ │ ├── EPXAnalyticsRepository.h │ │ ├── EPXAnalyticsSink.h │ │ ├── EPXAnalyticsTimerFactory.h │ │ ├── EPXAnalyticsTrackEvent.h │ │ ├── EPXAnalyticsTrackEventsEntity.h │ │ ├── EPXAnalyticsTrackEventsUploader.h │ │ ├── EPXCachedAnalyticsSink.h │ │ ├── EPXEncryptedFramesRelay.h │ │ ├── EPXEncryptedFramesRelayInternal_Bridge.h │ │ ├── EPXGenericErrorFactory.h │ │ ├── EPXPersistentAnalyticsRepository.h │ │ ├── EPXProximityObserverConfiguration+Internal.h │ │ ├── EPXProximityZoneEngine.h │ │ ├── EPXProximityZoneStateChangeObserver.h │ │ ├── EPXSQLiteCreator.h │ │ ├── EPXSQLiteTableInspector.h │ │ ├── EPXTimerAnalyticsHeartbeatGenerator.h │ │ ├── EstimoteProximitySDKPrivate.h │ │ ├── FMDB.h │ │ ├── FMDatabaseAdditions.h │ │ ├── FMDatabasePool_EPX.h │ │ ├── FMDatabaseQueue_EPX.h │ │ ├── FMDatabase_EPX.h │ │ └── FMResultSet_EPX.h │ └── ios-arm64_x86_64-simulator │ └── EstimoteProximitySDK.framework │ ├── EstimoteProximitySDK │ ├── Headers │ ├── EPXCloudCredentials.h │ ├── EPXProximityObserver.h │ ├── EPXProximityObserverConfiguration.h │ ├── EPXProximityRange.h │ ├── EPXProximityZone.h │ ├── EPXProximityZoneContext.h │ ├── EstimoteProximitySDK-Swift.h │ └── EstimoteProximitySDK.h │ ├── Info.plist │ ├── Modules │ ├── EstimoteProximitySDK.swiftmodule │ │ ├── arm64-apple-ios-simulator.abi.json │ │ ├── arm64-apple-ios-simulator.private.swiftinterface │ │ ├── arm64-apple-ios-simulator.swiftdoc │ │ ├── arm64-apple-ios-simulator.swiftinterface │ │ ├── x86_64-apple-ios-simulator.abi.json │ │ ├── x86_64-apple-ios-simulator.private.swiftinterface │ │ ├── x86_64-apple-ios-simulator.swiftdoc │ │ └── x86_64-apple-ios-simulator.swiftinterface │ └── module.modulemap │ ├── PrivateHeaders │ ├── AnalyticsTrackEventAdapter_Bridge.h │ ├── EPXAnalyticsRepository.h │ ├── EPXAnalyticsSink.h │ ├── EPXAnalyticsTimerFactory.h │ ├── EPXAnalyticsTrackEvent.h │ ├── EPXAnalyticsTrackEventsEntity.h │ ├── EPXAnalyticsTrackEventsUploader.h │ ├── EPXCachedAnalyticsSink.h │ ├── EPXEncryptedFramesRelay.h │ ├── EPXEncryptedFramesRelayInternal_Bridge.h │ ├── EPXGenericErrorFactory.h │ ├── EPXPersistentAnalyticsRepository.h │ ├── EPXProximityObserverConfiguration+Internal.h │ ├── EPXProximityZoneEngine.h │ ├── EPXProximityZoneStateChangeObserver.h │ ├── EPXSQLiteCreator.h │ ├── EPXSQLiteTableInspector.h │ ├── EPXTimerAnalyticsHeartbeatGenerator.h │ ├── EstimoteProximitySDKPrivate.h │ ├── FMDB.h │ ├── FMDatabaseAdditions.h │ ├── FMDatabasePool_EPX.h │ ├── FMDatabaseQueue_EPX.h │ ├── FMDatabase_EPX.h │ └── FMResultSet_EPX.h │ └── _CodeSignature │ └── CodeResources ├── LICENSE ├── Package.swift ├── README.md ├── docs ├── Classes.html ├── Classes │ ├── EPXCloudCredentials.html │ ├── EPXProximityObserver.html │ ├── EPXProximityObserverConfiguration.html │ ├── EPXProximityRange.html │ ├── EPXProximityZone.html │ └── EPXProximityZoneContext.html ├── Constants.html ├── Enums.html ├── Enums │ ├── EPXLogLevel.html │ └── EPXProximityObserverError.html ├── badge.svg ├── css │ ├── highlight.css │ └── jazzy.css ├── docsets │ ├── EstimoteProximitySDK.docset │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── Documents │ │ │ ├── Classes.html │ │ │ ├── Classes │ │ │ │ ├── EPXCloudCredentials.html │ │ │ │ ├── EPXProximityObserver.html │ │ │ │ ├── EPXProximityObserverConfiguration.html │ │ │ │ ├── EPXProximityRange.html │ │ │ │ ├── EPXProximityZone.html │ │ │ │ └── EPXProximityZoneContext.html │ │ │ ├── Constants.html │ │ │ ├── Enums.html │ │ │ ├── Enums │ │ │ │ ├── EPXLogLevel.html │ │ │ │ └── EPXProximityObserverError.html │ │ │ ├── css │ │ │ │ ├── highlight.css │ │ │ │ └── jazzy.css │ │ │ ├── img │ │ │ │ ├── carat.png │ │ │ │ ├── dash.png │ │ │ │ └── gh.png │ │ │ ├── index.html │ │ │ ├── js │ │ │ │ ├── jazzy.js │ │ │ │ └── jquery.min.js │ │ │ └── search.json │ │ │ └── docSet.dsidx │ └── EstimoteProximitySDK.tgz ├── img │ ├── carat.png │ ├── dash.png │ └── gh.png ├── index.html ├── js │ ├── jazzy.js │ └── jquery.min.js ├── search.json └── undocumented.json ├── readme_images ├── adding_attachments.png ├── assign_tag.png └── tag_based_sdk.png └── tools └── migration_from_ibeacon_and_tags_to_attachments ├── README.md ├── migration.py ├── requirements.txt └── resources └── images ├── attachments.PNG └── iBeacon.PNG /.gitignore: -------------------------------------------------------------------------------- 1 | # macOS 2 | .DS_Store 3 | 4 | # Xcode 5 | # 6 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 7 | 8 | ## User settings 9 | xcuserdata/ 10 | 11 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 12 | *.xcscmblueprint 13 | *.xccheckout 14 | 15 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 16 | build/ 17 | DerivedData/ 18 | *.moved-aside 19 | *.pbxuser 20 | !default.pbxuser 21 | *.mode1v3 22 | !default.mode1v3 23 | *.mode2v3 24 | !default.mode2v3 25 | *.perspectivev3 26 | !default.perspectivev3 27 | xcuserdata/ 28 | .swiftpm 29 | -------------------------------------------------------------------------------- /ACKNOWLEDGEMENTS: -------------------------------------------------------------------------------- 1 | FMDB (https://github.com/ccgus/fmdb) 2 | 3 | Copyright (c) 2008-2014 Flying Meat Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AvailableLibraries 6 | 7 | 8 | LibraryIdentifier 9 | ios-arm64_x86_64-simulator 10 | LibraryPath 11 | EstimoteProximitySDK.framework 12 | SupportedArchitectures 13 | 14 | arm64 15 | x86_64 16 | 17 | SupportedPlatform 18 | ios 19 | SupportedPlatformVariant 20 | simulator 21 | 22 | 23 | LibraryIdentifier 24 | ios-arm64 25 | LibraryPath 26 | EstimoteProximitySDK.framework 27 | SupportedArchitectures 28 | 29 | arm64 30 | 31 | SupportedPlatform 32 | ios 33 | 34 | 35 | CFBundlePackageType 36 | XFWK 37 | XCFrameworkFormatVersion 38 | 1.0 39 | 40 | 41 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/EstimoteProximitySDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/EstimoteProximitySDK -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Headers/EPXCloudCredentials.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Estimote Cloud credentials encapsulated in a value object. To acquire App ID & App Token go to 18 | https://cloud.estimote.com/#/apps. 19 | */ 20 | NS_SWIFT_NAME(CloudCredentials) 21 | @interface EPXCloudCredentials : NSObject 22 | 23 | /** 24 | App ID generated in Estimote Cloud. 25 | */ 26 | @property(nonatomic, strong, readonly) NSString *appID; 27 | 28 | /** 29 | App Token generated in Estimote Cloud. 30 | */ 31 | @property(nonatomic, strong, readonly) NSString *appToken; 32 | 33 | /** 34 | Init is disabled for this class. 35 | */ 36 | - (instancetype)init NS_UNAVAILABLE; 37 | 38 | /** 39 | New is disabled for this class. 40 | */ 41 | + (instancetype) new NS_UNAVAILABLE; 42 | 43 | /** 44 | Designated initializer. 45 | 46 | @param appID App ID generated in Estimote Cloud. 47 | @param appToken App Token generated in Estimote Cloud. 48 | */ 49 | - (instancetype)initWithAppID:(NSString *)appID appToken:(NSString *)appToken NS_DESIGNATED_INITIALIZER; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXCloudCredentials; 15 | @class EPXProximityZone; 16 | @class EPXProximityObserverConfiguration; 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | FOUNDATION_EXPORT NSString *const EPXProximityObserverErrorDomain; 21 | 22 | /** 23 | Possible errors invoked with Proximity Observer's error block. 24 | */ 25 | typedef NS_ENUM(NSUInteger, EPXProximityObserverError) { 26 | /* Unknown error probably due to a bug. If you're getting errors with this code please report it on 27 | * https://forums.estimote.com, using contact@estimote.com or filing an issue on Github. */ 28 | EPXProximityObserverErrorUnknown = 0, 29 | 30 | /* Fetching tags from Cloud failed. */ 31 | EPXProximityObserverErrorFetchingTagsFailed, 32 | 33 | /* Fetching attachments from Cloud failed. */ 34 | EPXProximityObserverErrorFetchingAttachmentsFailed, 35 | 36 | /* Bluetooth is unsupported on this iOS device. */ 37 | EPXProximityObserverErrorBluetoothUnsupported, 38 | 39 | /* Bluetooth is turned off. */ 40 | EPXProximityObserverErrorBluetoothOff, 41 | 42 | /* Couldn't use motion detection. */ 43 | EPXProximityObserverErrorMotionDetectionFailed, 44 | 45 | /* Core Location Services interferred with monitoring */ 46 | EPXProximityObserverErrorMonitoringNotPermitted 47 | }; 48 | 49 | /** 50 | Observes and reports proximity of Estimote devices. 51 | Uses Estimote Monitoring under the hood. Encapsulates it under tag-based beacon identification and callback blocks. 52 | */ 53 | NS_SWIFT_NAME(ProximityObserver) 54 | @interface EPXProximityObserver : NSObject 55 | 56 | /** 57 | Init is disabled for this class. 58 | */ 59 | - (instancetype)init NS_UNAVAILABLE; 60 | 61 | /** 62 | New is disabled for this class. 63 | */ 64 | + (instancetype) new NS_UNAVAILABLE; 65 | 66 | /** 67 | Convenience initializer. Calls designated initializer with default configuration. 68 | @param credentials Cloud Credentials object used to authorize requests sent to Estimote Cloud. 69 | @param errorBlock Block invoked whenever error occurs. The parameter is an NSError object, with 70 | domain equal to EPXProximityObserverErrorDomain and code from EPXProximityObserverError enum. 71 | */ 72 | - (instancetype)initWithCredentials:(EPXCloudCredentials *)credentials onError:(void (^)(NSError *error))errorBlock; 73 | 74 | /** 75 | Designated initializer. 76 | @param credentials Cloud Credentials object used to authorize requests sent to Estimote Cloud. 77 | @param configuration Proximity observer configuration that can be used for Proximity Observer's behaviour customization. 78 | @param errorBlock Block invoked whenever error occurs. The parameter is an NSError object, with 79 | domain equal to EPXProximityObserverErrorDomain and code from EPXProximityObserverError enum. 80 | */ 81 | - (instancetype)initWithCredentials:(EPXCloudCredentials *)credentials 82 | configuration:(EPXProximityObserverConfiguration *)configuration 83 | onError:(void (^)(NSError *error))errorBlock; 84 | 85 | /** 86 | Start observing and calling callbacks on provided proximity zones: 87 | - request device details for all user's devices from Estimote Cloud, 88 | - start Estimote Monitoring at registered ranges, 89 | - call registered enter/exit/change blocks when proximity event occurs. 90 | 91 | Subsequent calls of this method cause overwriting previously observed zones. 92 | 93 | @param zones Zones to be observed. 94 | */ 95 | - (void)startObservingZones:(NSArray *)zones; 96 | 97 | /** 98 | Stop observing and calling callbacks for all zones that were provided with -startObservingZones:, 99 | release memory resources allocated for monitoring the zones. 100 | 101 | Subsequent calls of this method (without re-starting observing zones) have the same effect as calling it just once. 102 | */ 103 | - (void)stopObservingZones; 104 | 105 | @end 106 | 107 | NS_ASSUME_NONNULL_END 108 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Headers/EPXProximityObserverConfiguration.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Defines logger level. 18 | */ 19 | typedef NS_ENUM(NSUInteger, EPXLogLevel) { 20 | /* Mute all logs. */ 21 | EPXLogLevelNone = 0, 22 | 23 | /* Log errors only. */ 24 | EPXLogLevelError = 1, 25 | 26 | /* Log errors and warnings. */ 27 | EPXLogLevelWarning = 2, 28 | 29 | /* Log errors, warnings and regular messages. */ 30 | EPXLogLevelInfo = 3 31 | }; 32 | 33 | /** 34 | Used to customize Proximity Observer behaviour. 35 | */ 36 | NS_SWIFT_NAME(ProximityObserverConfiguration) 37 | @interface EPXProximityObserverConfiguration : NSObject 38 | 39 | /** 40 | Creates a default Proximity Observer configuration object, which has `EPXLogLevelWarning` logs level, and enabled both requesting Core Location authorization and telemetry reporting. 41 | */ 42 | @property(nonatomic, strong, readonly, class) EPXProximityObserverConfiguration *defaultConfiguration; 43 | 44 | /** 45 | Logger level. Defines which logs generated by Estimote Proximity SDK are printed to the Xcode's console. 46 | */ 47 | @property(nonatomic, assign, readonly) EPXLogLevel logLevel; 48 | 49 | /** 50 | Indicates if SDK should request Core Location's authorization. 51 | */ 52 | @property(nonatomic, assign, readonly) BOOL requestsCLAuthorization; 53 | /** 54 | Indicates if full telemetry data will be reported to the Cloud. 55 | */ 56 | @property(nonatomic, assign, readonly) BOOL telemetryReportingEnabled; 57 | 58 | /** 59 | Convenience intializer for creating a custom configuration. 60 | 61 | @param logLevel Defines which logs will be printed. 62 | @param requestsCLAuthorization Indicates if Core Location authorization should be requested. 63 | @param telemetryReportingEnabled Indicates if telemetry reporting should be enabled. 64 | @return Initialized custom configuration. 65 | */ 66 | + (instancetype)customWithLogLevel:(EPXLogLevel)logLevel requestsCLAuthorization:(BOOL)requestsCLAuthorization telemetryReportingEnabled:(BOOL)telemetryReportingEnabled; 67 | 68 | @end 69 | 70 | NS_ASSUME_NONNULL_END 71 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Headers/EPXProximityRange.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Represents range of a proximity where enter/exit events should occur. 18 | 19 | Note: 20 | Due to BLE signal instability the actual place where notifications occur will differ. 21 | The `meanTriggerDistance` value defines the desired mean of distance at which events occur. 22 | 23 | The distance is rounded up to decimeters. Don't expect decimeter accuracy; this is only for simplification 24 | of EPXProximityRange objects comparison. 25 | */ 26 | NS_SWIFT_NAME(ProximityRange) 27 | @interface EPXProximityRange : NSObject 28 | 29 | /** 30 | Distance in meters where enter/exit events should occur passed in initializer rounded to decimeters (to 0.1). 31 | */ 32 | @property(nonatomic, assign, readonly) double desiredMeanTriggerDistance; 33 | 34 | /** 35 | Convenience factory for near range. Returns range with meanTriggerDistance set to 1m. 36 | 37 | It's a class property instead of class method to enable good-looking Swift code. 38 | */ 39 | @property(nonatomic, copy, readonly, class) EPXProximityRange *nearRange; 40 | 41 | /** 42 | Convenience factory for far range. Returns range with meanTriggerDistance set to 5m. 43 | 44 | It's a class property instead of class method to enable good-looking Swift code. 45 | */ 46 | @property(nonatomic, copy, readonly, class) EPXProximityRange *farRange; 47 | 48 | /** 49 | Init is disabled for this class. 50 | */ 51 | - (instancetype)init NS_UNAVAILABLE; 52 | 53 | /** 54 | New is disabled for this class. 55 | */ 56 | + (instancetype) new NS_UNAVAILABLE; 57 | 58 | /** 59 | Designated initializer. 60 | 61 | @param desiredMeanTriggerDistance Distance in meters where enter/exit events should occur rounded to decimeters (to 0.1). 62 | It has to be a non-negative number. 63 | 64 | @return Initialized object. Nil if passed desiredMeanTriggerDistance is negative. 65 | */ 66 | - (nullable instancetype)initWithDesiredMeanTriggerDistance:(double)desiredMeanTriggerDistance NS_DESIGNATED_INITIALIZER; 67 | 68 | /** 69 | Convenience factory method. Calls `-initWithMeanTriggerDistance:`. 70 | 71 | @param desiredMeanTriggerDistance Distance in meters where enter/exit events should occur rounded to decimeters (to 0.1). 72 | It has to be a non-negative number. 73 | 74 | @return Initialized object. Nil if passed desiredMeanTriggerDistance is negative. 75 | */ 76 | + (nullable instancetype)customRangeWithDesiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 77 | NS_SWIFT_NAME(custom(desiredMeanTriggerDistance:)); 78 | 79 | #pragma mark isEqual overrides 80 | - (BOOL)isEqualToRange:(EPXProximityRange *)otherRange; 81 | - (BOOL)isEqual:(nullable id)otherObject; 82 | - (NSUInteger)hash; 83 | 84 | @end 85 | 86 | NS_ASSUME_NONNULL_END 87 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Headers/EPXProximityZone.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | #import "EPXProximityRange.h" 14 | #import "EPXProximityZoneContext.h" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | /** 19 | Represents a logical zone. Is represented by range from a beacon and its tag. 20 | Can be spanned by one or more beacons. Beacon identification is tag-based 21 | (see https://github.com/Estimote/iOS-Proximity-SDK/blob/master/README.md for more info). 22 | */ 23 | NS_SWIFT_NAME(ProximityZone) 24 | @interface EPXProximityZone : NSObject 25 | 26 | /** 27 | Range where the action should be reported. 28 | */ 29 | @property(nonatomic, strong, readonly) EPXProximityRange *range; 30 | 31 | /** 32 | Tag assigned in Cloud to that zone. 33 | */ 34 | @property(nonatomic, readonly) NSString *tag; 35 | 36 | /** 37 | Register block to be called when user enters proximity of Estimote devices with matching tag. 38 | Beacon identification is tag-based (see https://github.com/Estimote/iOS-SDK/blob/sdk_5/README.md for more info). 39 | */ 40 | @property(nonatomic, copy, readwrite, nullable) void (^onEnter)(EPXProximityZoneContext *zoneContext); 41 | 42 | /** 43 | Block to be called when user exits proximity of Estimote devices with matching tag. 44 | Beacon identification is tag-based (see https://github.com/Estimote/iOS-SDK/blob/sdk_5/README.md for more info). 45 | */ 46 | @property(nonatomic, copy, readwrite, nullable) void (^onExit)(EPXProximityZoneContext *zoneContext); 47 | 48 | /** 49 | Block to be called each time a new beacon is detected in user's range and each time a beacon disappears 50 | from user's range. 51 | */ 52 | @property(nonatomic, copy, readwrite, nullable) void (^onContextChange)(NSSet *zoneContexts); 53 | 54 | /** 55 | Init is unavailable. 56 | */ 57 | - (instancetype)init NS_UNAVAILABLE; 58 | 59 | /** 60 | New is unavailable. 61 | */ 62 | + (instancetype) new NS_UNAVAILABLE; 63 | 64 | /** 65 | Designated initilizer. 66 | 67 | @param tag Tag name assigned to the zone. 68 | @param range Range where the action should be reported. 69 | */ 70 | - (instancetype)initWithTag:(NSString *)tag range:(EPXProximityRange *)range NS_DESIGNATED_INITIALIZER; 71 | 72 | @end 73 | 74 | NS_ASSUME_NONNULL_END 75 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Headers/EPXProximityZoneContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Interface providing all contextual data about a Proximity Zone. 18 | */ 19 | NS_SWIFT_NAME(ProximityZoneContext) 20 | @interface EPXProximityZoneContext: NSObject 21 | 22 | /** 23 | Identifier of a device that is the zone's source. 24 | */ 25 | @property (nonatomic, readonly) NSString *deviceIdentifier; 26 | /** 27 | Tag assigned in Cloud to that zone's source. 28 | */ 29 | @property (nonatomic, readonly) NSString *tag; 30 | /** 31 | Dictionary of attachments assigned in Cloud to that zone's source. 32 | */ 33 | @property (nonatomic, readonly) NSDictionary *attachments; 34 | 35 | - (instancetype)init NS_UNAVAILABLE; 36 | + (instancetype)new NS_UNAVAILABLE; 37 | 38 | /** 39 | Designated initializer. 40 | 41 | @param deviceIdentifier Zone's source. 42 | @param tag Zone's tag name. 43 | @param attachments Dicitionary of attachments. 44 | @return Initialized object. 45 | */ 46 | - (instancetype)initWithDeviceIdentifier:(NSString *)deviceIdentifier 47 | tag:(NSString *)tag 48 | attachments:(NSDictionary *)attachments NS_DESIGNATED_INITIALIZER; 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Headers/EstimoteProximitySDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | //! Project version number for EstimoteProximitySDK. 15 | FOUNDATION_EXPORT double EstimoteProximitySDKVersionNumber; 16 | 17 | //! Project version string for EstimoteProximitySDK. 18 | FOUNDATION_EXPORT const unsigned char EstimoteProximitySDKVersionString[]; 19 | 20 | // In this header, you should import all the public headers of your framework using statements like #import 21 | 22 | #import "EPXProximityObserver.h" 23 | #import "EPXProximityObserverConfiguration.h" 24 | #import "EPXProximityZone.h" 25 | #import "EPXProximityRange.h" 26 | #import "EPXCloudCredentials.h" 27 | #import "EPXProximityZoneContext.h" 28 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Info.plist -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios.private.swiftinterface: -------------------------------------------------------------------------------- 1 | // swift-interface-format-version: 1.0 2 | // swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) 3 | // swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name EstimoteProximitySDK 4 | // swift-module-flags-ignorable: -enable-bare-slash-regex 5 | import CoreLocation.CLLocationManager 6 | import CoreLocation 7 | import CoreMotion 8 | import EstimoteBluetoothScanning.EBSScanInfo 9 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteEncrypted 10 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteLocation 11 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryA 12 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryB 13 | import EstimoteBluetoothScanning.EBSScanInfoLocationConnectivity 14 | import EstimoteBluetoothScanning 15 | @_exported import EstimoteProximitySDK 16 | import Foundation 17 | import Swift 18 | import UIKit.UIApplication 19 | import UIKit.UIDevice 20 | import UIKit 21 | import _Concurrency 22 | import _StringProcessing 23 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios.swiftdoc -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios.swiftinterface: -------------------------------------------------------------------------------- 1 | // swift-interface-format-version: 1.0 2 | // swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) 3 | // swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name EstimoteProximitySDK 4 | // swift-module-flags-ignorable: -enable-bare-slash-regex 5 | import CoreLocation.CLLocationManager 6 | import CoreLocation 7 | import CoreMotion 8 | import EstimoteBluetoothScanning.EBSScanInfo 9 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteEncrypted 10 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteLocation 11 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryA 12 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryB 13 | import EstimoteBluetoothScanning.EBSScanInfoLocationConnectivity 14 | import EstimoteBluetoothScanning 15 | @_exported import EstimoteProximitySDK 16 | import Foundation 17 | import Swift 18 | import UIKit.UIApplication 19 | import UIKit.UIDevice 20 | import UIKit 21 | import _Concurrency 22 | import _StringProcessing 23 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | 11 | framework module EstimoteProximitySDK { 12 | umbrella header "EstimoteProximitySDK.h" 13 | 14 | export * 15 | module * { export * } 16 | 17 | framework module Private { 18 | umbrella header "EstimoteProximitySDKPrivate.h" 19 | 20 | export * 21 | module * { export * } 22 | } 23 | } 24 | 25 | 26 | module EstimoteProximitySDK.Swift { 27 | header "EstimoteProximitySDK-Swift.h" 28 | requires objc 29 | } 30 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/AnalyticsTrackEventAdapter_Bridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | @import Foundation; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @class EPXAnalyticsTrackEvent; 17 | @class EPXAnalyticsTrackEventsEntity; 18 | 19 | 20 | @interface EPXAnalyticsTrackEventAdapter : NSObject 21 | 22 | - (EPXAnalyticsTrackEvent *)trackEventFromEntity:(EPXAnalyticsTrackEventsEntity *)entity; 23 | - (EPXAnalyticsTrackEventsEntity *)entityFromTrackEvent:(EPXAnalyticsTrackEvent *)trackEvent; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsRepository.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #ifndef EPXAnalyticsRepository_h 13 | #define EPXAnalyticsRepository_h 14 | 15 | @import Foundation; 16 | 17 | @class EPXAnalyticsTrackEventsEntity; 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @protocol EPXAnalyticsRepository 22 | 23 | /** 24 | Opens or creates a file in "/com.estimote.EstimoteProximitySDK/analytics_events.sqlite". 25 | 26 | Checks if the file is a proper SQLite file and if the database contains tables with required schema. 27 | Overwrites the file if it's invalid, drops tables if the schema is invalid. 28 | Results in an open database object. 29 | 30 | @return YES if opening/creating database succeeded, NO otherwise. 31 | */ 32 | - (BOOL)setupDatabase; 33 | 34 | /** 35 | Inserts track event entity to the database. Requires database being set up before. 36 | 37 | @param event Event to save. 38 | */ 39 | - (void)saveEvent:(EPXAnalyticsTrackEventsEntity *)event; 40 | 41 | /** 42 | Retrieves a number of oldest events stored in the database. 43 | 44 | @param limit Number of events to retrieve. 45 | @return Retrieved events. 46 | */ 47 | - (NSArray *)findOldestEventsWithLimit:(NSInteger)limit; 48 | 49 | /** 50 | Delete from the database every event with timestamp smaller or equal to the one provided. 51 | 52 | @param timestampDate Date (its timeIntervalSince1970) that events' timestamps are compared with. 53 | */ 54 | - (void)deleteAllEventsBeforeOrAtTimestampDate:(NSDate *)timestampDate; 55 | 56 | /** 57 | Returns number of events stored in the database. 58 | */ 59 | - (NSUInteger)eventsCount; 60 | 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | 65 | #endif /* EPXAnalyticsRepository_h */ 66 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsSink.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #ifndef EPXAnalyticsSink_h 13 | #define EPXAnalyticsSink_h 14 | 15 | @class EPXAnalyticsTrackEvent; 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | 20 | @protocol EPXAnalyticsSink 21 | 22 | /* 23 | Transforms provided trackEventVO to entity consumable by the database, inserts the entity to the database, 24 | triggers track events batch upload if needed. 25 | */ 26 | - (void)addTrackEvent:(EPXAnalyticsTrackEvent *)trackEvent; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | 32 | #endif /* EPXAnalyticsSink_h */ 33 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTimerFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | 17 | @interface EPXAnalyticsTimerFactory : NSObject 18 | 19 | - (NSTimer *)makeScheduledTimerWithInterval:(NSTimeInterval)interval repeats:(BOOL)repeats block:(void (^)(NSTimer *))block; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTrackEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | typedef NS_ENUM(NSUInteger, EPXAnalyticsTrackEventEventType) { 15 | EPXAnalyticsTrackEventEventTypeUnknown = 0, 16 | EPXAnalyticsTrackEventEventTypeEnter, 17 | EPXAnalyticsTrackEventEventTypeExit, 18 | EPXAnalyticsTrackEventEventTypeHeartbeat 19 | }; 20 | 21 | typedef NS_ENUM(NSUInteger, EPXAnalyticsTrackEventPacketType) { 22 | EPXAnalyticsTrackEventPacketTypeUnknown = 0, 23 | EPXAnalyticsTrackEventPacketTypeEstimoteLocation 24 | }; 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @interface EPXAnalyticsTrackEvent : NSObject 29 | 30 | @property (nonatomic, strong, readonly) NSString *deviceIdentifier; 31 | @property (nonatomic, assign, readonly) EPXAnalyticsTrackEventEventType eventType; 32 | @property (nonatomic, assign, readonly) EPXAnalyticsTrackEventPacketType packetType; 33 | @property (nonatomic, assign, readonly) double expectedDistance; 34 | @property (nonatomic, assign, readonly) BOOL inForeground; 35 | @property (nonatomic, strong, readonly) NSUUID *distinctUUID; 36 | @property (nonatomic, strong, readonly) NSDate *date; 37 | 38 | - (instancetype)initWithDeviceIdentifier:(NSString *)deviceIdentifier 39 | eventType:(EPXAnalyticsTrackEventEventType)eventType 40 | packetType:(EPXAnalyticsTrackEventPacketType)packetType 41 | expectedDistance:(double)expectedDistance 42 | inForeground:(BOOL)inForeground 43 | distinctUUID:(NSUUID *)distinctUUID 44 | date:(NSDate *)date; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTrackEventsEntity.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | 17 | /** 18 | Represents a row in 'analytics_track_events' table in database created by EPXPersistentAnalyticsRepository. 19 | */ 20 | @interface EPXAnalyticsTrackEventsEntity : NSObject 21 | 22 | /** 23 | Packet type powering algorithm that analytics tracks (i.e. Estimote Location for Estimote Monitoring). 24 | */ 25 | @property (nonatomic, strong, readonly) NSString *packetIdentifier; 26 | 27 | /** 28 | Beacon-based event name that triggered analytics ping (i.e. enter). 29 | */ 30 | @property (nonatomic, strong, readonly) NSString *eventType; 31 | 32 | /** 33 | Packet name powering algorithm that analytics tracks (i.e. estimote_location for Estimote Monitoring). 34 | */ 35 | @property (nonatomic, strong, readonly) NSString *packetType; 36 | 37 | /** 38 | Distance where the notification was set to appear. 39 | */ 40 | @property (nonatomic, strong, readonly) NSNumber *expectedDistance; 41 | 42 | /** 43 | UNIX time in seconds. 44 | */ 45 | @property (nonatomic, strong, readonly) NSNumber *timestamp; 46 | 47 | /** 48 | Flag meaning application state. 49 | */ 50 | @property (nonatomic, strong, readonly) NSNumber *foreground; 51 | 52 | /** 53 | SDK-generated identifier used to identify end users (AKA "beacon consumers"). 54 | */ 55 | @property (nonatomic, strong, readonly) NSString *distinctID; 56 | 57 | - (instancetype)init NS_UNAVAILABLE; 58 | + (instancetype)new NS_UNAVAILABLE; 59 | 60 | 61 | /** 62 | Designated initalizer. 63 | 64 | @param packetIdentifier Packet type powering algorithm that analytics tracks (i.e. Estimote Location for Estimote Monitoring). 65 | @param eventType Beacon-based event name that triggered analytics ping (i.e. enter). 66 | @param packetType Packet name powering algorithm that analytics tracks (i.e. estimote_location for Estimote Monitoring). 67 | @param expectedDistance Distance where the notification was set to appear. 68 | @param timestamp UNIX time in seconds. 69 | @param foreground Flag meaning application state. 70 | @param distinctID SDK-generated identifier used to identify end users (AKA "beacon consumers"). 71 | */ 72 | - (instancetype)initWithPacketIdentifier:(NSString *)packetIdentifier eventType:(NSString *)eventType packetType:(NSString *)packetType expectedDistance:(NSNumber *)expectedDistance timestamp:(NSNumber *)timestamp foreground:(NSNumber *)foreground distinctID:(NSString *)distinctID NS_DESIGNATED_INITIALIZER; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTrackEventsUploader.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #ifndef EPXAnalyticsTrackEventsUploader_h 13 | #define EPXAnalyticsTrackEventsUploader_h 14 | 15 | #import 16 | 17 | @class EPXAnalyticsTrackEvent; 18 | @class EPXCloudAnalyticsTrackEventsSender; 19 | @protocol EPXAnalyticsTrackEventsSender; 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @protocol EPXAnalyticsTrackEventsUploader 24 | 25 | /** 26 | Tells if an upload operation is in progress. 27 | 28 | Note: at the time of calling `-[delegate didUploadTrackEvents:]`, or `-[delegate didFailUploadingTrackEvents:afterFailedAttemptsCount:]` this property is still YES. 29 | */ 30 | - (BOOL)uploadIsInProgress; 31 | 32 | /** 33 | Sends a request to Cloud with provided track event. If the request fails, asks `decisionSource` if the request should be retried. 34 | 35 | Note: this method doesn't check if a batch upload is already happening. This should be done separately, using `-uploadIsInProgress`. 36 | 37 | @param trackEvents Array of track events to send in request as a batch. 38 | */ 39 | - (void)scheduleUploadingTrackEvents:(NSArray *)trackEvents; 40 | 41 | @end 42 | 43 | 44 | /** 45 | Asked by EPXAnalyticsTrackEventsUploader about policy on Cloud request retrial. 46 | */ 47 | @protocol EPXAnalyticsTrackEventsUploaderDecisionSource 48 | 49 | - (BOOL)shouldUploaderRetry:(id)uploader 50 | afterFailedAttemptsCount:(NSInteger)failedAttemptsCount 51 | whenRequestFailedWithError:(NSError *)requestError; 52 | 53 | @end 54 | 55 | /** 56 | Notified by EPXAnalyticsTrackEventsUploader when an upload succeeds or fails. 57 | */ 58 | @protocol EPXAnalyticsTrackEventsUploaderDelegate 59 | 60 | - (void)uploader:(id)uploader didUploadTrackEvents:(NSArray *)trackEventsVOs; 61 | 62 | // TODO: consider removing it if unused 63 | - (void)uploader:(id)uploader didFailUploadingTrackEvents:(NSArray *)trackEventsVOs afterFailedAttemptsCount:(NSInteger)failedAttemptsCount; 64 | 65 | @end 66 | 67 | NS_ASSUME_NONNULL_END 68 | 69 | #endif /* EPXAnalyticsTrackEventsUploader_h */ 70 | 71 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXCachedAnalyticsSink.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | #import "EPXAnalyticsSink.h" 14 | #import "EPXAnalyticsTrackEventsUploader.h" 15 | #import "EPXAnalyticsRepository.h" 16 | #import "EPXAnalyticsTrackEventsUploader.h" 17 | 18 | @class EPXAnalyticsTrackEvent; 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | /** 23 | Caches analytics events, persists them on disk, schedules uploading events to Cloud, clears uploaded events. 24 | */ 25 | @interface EPXCachedAnalyticsSink : NSObject 28 | 29 | /* 30 | Repository used to save and retrieve analytics events. 31 | */ 32 | @property (nonatomic, strong, readonly) id analyticsRepository; 33 | 34 | /* 35 | Number of events sent in each batch in analytics requests. 36 | * */ 37 | @property (nonatomic, assign, readonly) NSUInteger batchSize; 38 | 39 | - (instancetype)init NS_UNAVAILABLE; 40 | + (instancetype)new NS_UNAVAILABLE; 41 | 42 | - (instancetype)initWithAnalyticsRepository:(id)analyticsRepository 43 | trackEventsUploader:(id)trackEventsUploader 44 | batchSize:(NSUInteger)batchSize NS_DESIGNATED_INITIALIZER; 45 | 46 | /* 47 | Transforms provided trackEvent to entity consumable by the database, inserts the entity to the database, 48 | triggers track events batch upload if needed. 49 | */ 50 | - (void)addTrackEvent:(EPXAnalyticsTrackEvent *)trackEvent; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXEncryptedFramesRelay.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | FOUNDATION_EXPORT NSString * const EPXEncryptedFramesRelayErrorDomain; 17 | 18 | /** 19 | Possible errors passed by EPXEncryptedFramesRelayDelegate. 20 | */ 21 | typedef NS_ENUM(NSInteger, EPXEncryptedFramesRelayError) { 22 | /* Unknown error probably due to a bug. */ 23 | EPXEncryptedFramesRelayErrorUnknown = 0, 24 | 25 | EPXEncryptedFramesRelayErrorURLSessionFailed = -1, 26 | EPXEncryptedFramesRelayErrorInvalidResponse = -2, 27 | 28 | EPXEncryptedFramesRelayErrorInvalidRequest = 400, 29 | EPXEncryptedFramesRelayErrorUnauthorized = 401, 30 | EPXEncryptedFramesRelayErrorNotFound = 404, 31 | EPXEncryptedFramesRelayErrorInternalSeverError = 500 32 | }; 33 | 34 | @class EPXEncryptedFramesRelay; 35 | @class EPXCloudCredentials; 36 | 37 | @protocol EPXEncryptedFramesRelayDelegate 38 | 39 | - (void)relay:(EPXEncryptedFramesRelay *)relay didFetchTitle:(nullable NSString *)title withError:(nullable NSError *)error; 40 | 41 | @end 42 | 43 | /** 44 | Handles beacon monitoring, sending payloads to backend service and fetching venue title to show on screen. 45 | */ 46 | @interface EPXEncryptedFramesRelay : NSObject 47 | 48 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 49 | cloudCredentials:(EPXCloudCredentials *)cloudCredentials 50 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 51 | delegate:(nullable id)delegate; 52 | 53 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 54 | bearerToken:(NSString *)bearerToken 55 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 56 | delegate:(id)delegate; 57 | 58 | - (void)start; 59 | - (void)stop; 60 | 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | 65 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXEncryptedFramesRelayInternal_Bridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface EPXEncryptedFramesRelayInternal : NSObject 17 | 18 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 19 | cloudCredentials:(EPXCloudCredentials *)cloudCredentials 20 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 21 | didFetchTitleBlock:(void (^)(NSString * _Nullable, NSError * _Nullable ))didFetchTitleBlock; 22 | 23 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 24 | bearerToken:(NSString *)bearerToken 25 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 26 | didFetchTitleBlock:(void (^)(NSString * _Nullable, NSError * _Nullable ))didFetchTitleBlock; 27 | 28 | - (void)start; 29 | - (void)stop; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXGenericErrorFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /* 17 | Simplifies creation of NSErrors. 18 | */ 19 | @interface EPXGenericErrorFactory : NSObject 20 | 21 | /* 22 | Constructs NSError object with domain, code and user info with proper keys. 23 | */ 24 | + (NSError *)makeErrorWithDomain:(NSString *)domain 25 | code:(NSInteger)code 26 | description:(nullable NSString *)description 27 | recovery:(nullable NSString *)recovery 28 | underlyingError:(nullable NSError *)underlyingError; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXPersistentAnalyticsRepository.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | #import "EPXAnalyticsRepository.h" 14 | 15 | @class FMDatabase_EPX; 16 | @class EPXSQLiteCreator; 17 | @class EPXSQLiteTableInspector; 18 | @class EPXAnalyticsTrackEventsEntity; 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | 23 | /** 24 | Persists analytics events on disk with a SQLite database. 25 | */ 26 | @interface EPXPersistentAnalyticsRepository : NSObject 27 | 28 | @property (nonatomic, strong, readonly) FMDatabase_EPX *database; 29 | 30 | /** 31 | Convenience initializer. 32 | */ 33 | - (instancetype)init; 34 | 35 | /** 36 | Designated initializer. 37 | 38 | @param sqliteCreator Creator object used to initialize database file. 39 | @param fileManager File manager used to generate database URL. 40 | @param tableInspector Inspector used to check if database has proper table schema. 41 | */ 42 | - (instancetype)initWithSqliteCreator:(EPXSQLiteCreator *)sqliteCreator fileManager:(NSFileManager *)fileManager tableInspector:(EPXSQLiteTableInspector *)tableInspector NS_DESIGNATED_INITIALIZER; 43 | 44 | /** 45 | Opens or creates a file in "/com.estimote.EstimoteProximitySDK/analytics_events.sqlite". 46 | 47 | Checks if the file is a proper SQLite file and if the database contains tables with required schema. 48 | Overwrites the file if it's invalid, drops tables if the schema is invalid. 49 | Results in an open database object. 50 | 51 | @return YES if opening/creating database succeeded, NO otherwise. 52 | */ 53 | - (BOOL)setupDatabase; 54 | 55 | /** 56 | Inserts track event entity to the database. Requires database being set up before. 57 | 58 | @param event Event to save. 59 | */ 60 | - (void)saveEvent:(EPXAnalyticsTrackEventsEntity *)event; 61 | 62 | /** 63 | Retrieves a number of oldest events stored in the database. 64 | 65 | @param limit Number of events to retrieve. 66 | @return Retrieved events. 67 | */ 68 | - (NSArray *)findOldestEventsWithLimit:(NSInteger)limit; 69 | 70 | /** 71 | Delete from the database every event with timestamp smaller or equal to the one provided. 72 | 73 | @param timestampDate Date (its timeIntervalSince1970) that events' timestamps are compared with. 74 | */ 75 | - (void)deleteAllEventsBeforeOrAtTimestampDate:(NSDate *)timestampDate; 76 | 77 | /** 78 | Returns number of events stored in the database. 79 | */ 80 | - (NSUInteger)eventsCount; 81 | 82 | @end 83 | 84 | NS_ASSUME_NONNULL_END 85 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXProximityObserverConfiguration+Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | @import Foundation; 13 | 14 | @interface EPXProximityObserverConfiguration (Internal) 15 | 16 | @property (nonatomic, nullable) NSURL *sensorsDataFlushDirectoryURL; 17 | @property (nonatomic, nullable) NSURL *sensorsDataReplayFileURL; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXProximityZoneEngine.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXProximityZone; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | /** 19 | Encapsulates decision making on whether a tag fits a given zone, or whether tag insertion/removal 20 | should trigger callbacks. 21 | */ 22 | @interface EPXProximityZoneEngine : NSObject 23 | 24 | /** 25 | Decides whether the provided tag matches given zone. 26 | 27 | @param tag Tag to be tested. 28 | @param zone Zone to be tested against. 29 | @return YES if tag matches the tag provided with the zone. 30 | */ 31 | - (BOOL)tag:(NSString *)tag matchesZone:(EPXProximityZone *)zone; 32 | 33 | /** 34 | Decides whether inserting new tag should trigger an enter callback. 35 | 36 | @param tagsInside Set of tags inside zone before insertion. 37 | @return YES if tagsInside contains no entries. 38 | */ 39 | - (BOOL)insertionToTagsSetShouldTriggerEnter:(NSSet *)tagsInside; 40 | 41 | /** 42 | Decides whether removing tag should trigger an exit callback. 43 | 44 | @param tagToRemove Tag to be removed from collection. 45 | @param tagsInside Set of tags inside zone before removal. 46 | @return YES if tagsInside contains exactly one object and it's equal to `tagToRemove`. 47 | */ 48 | - (BOOL)shouldTriggerExitWhenRemovingTag:(NSString *)tagToRemove fromTagsSet:(NSSet *)tagsInside; 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | 54 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXProximityZoneStateChangeObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXProximityZone; 15 | @class EPXProximityZoneEngine; 16 | @class EPXProximityZoneContext; 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | @protocol EPXProximityZoneContextStore 21 | 22 | /** 23 | Proximity zone this object wraps and holds state for. 24 | */ 25 | @property (nonatomic, strong, readonly) EPXProximityZone *proximityZone; 26 | 27 | - (void)insertZoneContext:(EPXProximityZoneContext *)context; 28 | - (void)removeZoneContext:(EPXProximityZoneContext *)context; 29 | 30 | @end 31 | 32 | /** 33 | Wraps a Proximity Zone to hold state of contexts that are currently inside the zone (`zoneContextsInside`). 34 | Additionally, allows to insert a context to the zone or remove it. Calls zone's registered callback if needed. 35 | */ 36 | @interface EPXProximityZoneStateChangeObserver : NSObject 37 | 38 | /** 39 | Proximity zone this object wraps and holds state for. 40 | */ 41 | @property (nonatomic, strong, readonly) EPXProximityZone *proximityZone; 42 | 43 | /** 44 | Proximity Zone Engine used for decisions on when enter/exit/change handlers should be called. 45 | */ 46 | @property (nonatomic, strong, readonly) EPXProximityZoneEngine *engine; 47 | 48 | /** 49 | Set of `EPXProximityZoneContext`s related to beacons that are currently within range. 50 | */ 51 | @property (nonatomic, strong, readonly) NSSet *zoneContextsInside; 52 | 53 | /** 54 | Init is unavailable. 55 | */ 56 | - (instancetype)init NS_UNAVAILABLE; 57 | /** 58 | New is unavailable. 59 | */ 60 | + (instancetype)new NS_UNAVAILABLE; 61 | 62 | /** 63 | Designated initalizer. 64 | 65 | @param zone Proximity Zone to hold state for. 66 | @param engine Proximity Zone Engine used for decisions on when enter/exit/change handlers should be called. 67 | */ 68 | - (instancetype)initWithZone:(EPXProximityZone *)zone 69 | engine:(EPXProximityZoneEngine *)engine NS_DESIGNATED_INITIALIZER; 70 | 71 | /** 72 | Check whether provided zone's context matches the zone, inserts it into `zoneContextsInside` set and calls `proximityZone`'s callbacks if necessary. 73 | Asks `engine` to decide whether enter/exit/change callbacks should happen. 74 | 75 | @param context Zone's context to be inserted. 76 | */ 77 | - (void)insertZoneContextAndCallHandlerIfNeeded:(EPXProximityZoneContext *)context; 78 | 79 | /** 80 | Check whether provided zone's context matches the zone, removes it from `zoneContextsInside` set and calls `proximityZone`'s callbacks if necessary. 81 | Asks `engine` to decide whether enter/exit/change callbacks should happen. 82 | 83 | @param context Zone's context to be removed. 84 | */ 85 | - (void)removeZoneContextAndCallHandlerIfNeeded:(EPXProximityZoneContext *)context; 86 | 87 | @end 88 | 89 | NS_ASSUME_NONNULL_END 90 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXSQLiteCreator.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class FMDatabase_EPX; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | 19 | /** 20 | Opens, creates or overwrites SQLite file at given path and provides a FMDatabase object. 21 | */ 22 | @interface EPXSQLiteCreator : NSObject 23 | 24 | /** 25 | Unavailable 26 | */ 27 | - (instancetype)init NS_UNAVAILABLE; 28 | 29 | /** 30 | Unavailable 31 | */ 32 | + (instancetype)new NS_UNAVAILABLE; 33 | 34 | /** 35 | Designated initializer. 36 | 37 | @param fileManager File manager object used to create enclosing directory and remove invalid file at provided URL. 38 | */ 39 | - (instancetype)initWithFileManager:(NSFileManager *)fileManager NS_DESIGNATED_INITIALIZER; 40 | 41 | /** 42 | Attempts to open SQLite file at given URL. Creates enclosing directory if needed. Removes file at given URL if it isn't 43 | a valid SQLite database file. Calls -open on the database object before returning. 44 | 45 | @param databaseURL URL of database file to open. 46 | @return Open database object. Nil if couldn't create parent directory, remove invalid file 47 | or failed to init and open database file properly. 48 | */ 49 | - (nullable FMDatabase_EPX *)openOrOverwriteDatabaseAtURL:(NSURL *)databaseURL; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXSQLiteTableInspector.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class FMDatabase_EPX; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | 19 | /** 20 | Checks database table schema. 21 | */ 22 | @interface EPXSQLiteTableInspector : NSObject 23 | 24 | /** 25 | Query the database for table schema using "PRAGMA table_info();" SQL query. 26 | 27 | From https://sqlite.org/pragma.html#pragma_table_info : 28 | This pragma returns one row for each column in the named table. Columns in the result set include the column name, 29 | data type, whether or not the column can be NULL, and the default value for the column. The "pk" column in the result 30 | set is zero for columns that are not part of the primary key, and is the index of the column in the primary key for 31 | columns that are part of the primary key. 32 | 33 | @param tableName Table to inspect. 34 | @param database Database object to execute the query on. 35 | @return Array of dictionaries. Each table column results in one dictionary. 36 | */ 37 | - (NSArray *> *)tableColumnInfoDictionariesForTableNamed:(NSString *)tableName 38 | inDatabase:(FMDatabase_EPX *)database; 39 | 40 | 41 | /** 42 | Checks whether the column info dictionaries matches pattern. 43 | The pattern is defined by a dictionary where a key is column name, and a value is expected column type. 44 | SQLite column types are "TEXT", "NUMERIC", "INTEGER", "REAL", "BLOB". 45 | 46 | @param columnInfos Column info dictionaries to be checked, one dictionary per column. 47 | @param columnNameTypes Column name to column type pattern to check against. 48 | @return YES if each column name from columnNameTypes exists in columnInfos 49 | and type of that column matches the type in columnNameTypes value. 50 | */ 51 | - (BOOL)schemaWithColumnInfos:(NSArray *> *)columnInfos 52 | matchesColumnNameTypes:(NSDictionary *)columnNameTypes; 53 | 54 | @end 55 | 56 | NS_ASSUME_NONNULL_END 57 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EPXTimerAnalyticsHeartbeatGenerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXAnalyticsTimerFactory; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | 19 | @protocol EPXAnalyticsHeartbeatGenerator 20 | 21 | /** 22 | All identifiers registered using `-startGeneratingHeartbeatForIdentifier:`. 23 | Calling `-stopGeneratingHeartbeatForIdentifier:` removes the identifier from this collection. 24 | */ 25 | @property (nonatomic, strong, readonly) NSSet *heartbeatIdentifiers; 26 | 27 | /** 28 | Create & schedule a timer for generating heartbeat events for a given identifier. 29 | Generated events are reported by calling delegate. 30 | 31 | Calling this method consecutively with the same argument has the same effect as calling it once. 32 | 33 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events should be 34 | generated for. 35 | */ 36 | - (void)startGeneratingHeartbeatForIdentifier:(NSString *)identifier; 37 | 38 | /** 39 | Invalidate and remove the timer for generating heartbeat events for given device. 40 | Stops calling delegate with events generated for this identifier. 41 | 42 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events generation 43 | should be stopped. 44 | */ 45 | - (void)stopGeneratingHeartbeatForIdentifier:(NSString *)identifier; 46 | 47 | @end 48 | 49 | 50 | @protocol EPXAnalyticsHeartbeatGeneratorDelegate 51 | 52 | /** 53 | Tells the delegate that heartbeat generator's timer generated a tick. 54 | @param heartbeatGenerator Object that triggered the heartbeat event. 55 | @param heartbeatDate Date of the heartbeat event. 56 | @param identifier Identifier that was used to start generating heartbeat events. 57 | */ 58 | - (void)heartbeatGenerator:(id)heartbeatGenerator 59 | didBeatAtDate:(NSDate *)heartbeatDate 60 | forIdentifier:(NSString *)identifier; 61 | 62 | @end 63 | 64 | 65 | @interface EPXTimerAnalyticsHeartbeatGenerator : NSObject 66 | 67 | /** 68 | All identifiers registered using `-startGeneratingHeartbeatForIdentifier:`. 69 | Calling `-stopGeneratingHeartbeatForIdentifier:` removes the identifier from this collection. 70 | */ 71 | @property (nonatomic, strong, readonly) NSSet *heartbeatIdentifiers; 72 | @property (nonatomic, weak, readwrite) id delegate; 73 | 74 | - (instancetype)init NS_UNAVAILABLE; 75 | + (instancetype)new NS_UNAVAILABLE; 76 | 77 | /** 78 | Designated initializer. 79 | @param timerFactory Timer factory used to create NSTimer objects. 80 | @param heartbeatInterval Interval at which timers are set to fire. 81 | @param currentDateProviderBlock Block used to determine current date when calling the delegate. 82 | @param delegate Delegate object to call on timer ticks. 83 | */ 84 | - (instancetype)initWithTimerFactory:(EPXAnalyticsTimerFactory *)timerFactory heartbeatInterval:(NSTimeInterval)heartbeatInterval currentDateProviderBlock:(NSDate *(^)(void))currentDateProviderBlock delegate:(nullable id )delegate; 85 | 86 | /** 87 | Convenience initializer. Calls designated initializer with newly created timer factory & nil delegate. 88 | @param heartbeatInterval Interval at which timers are set to fire. 89 | @param currentDateProviderBlock Block used to determine current date when calling the delegate. 90 | */ 91 | - (instancetype)initWithHeartbeatInterval:(NSTimeInterval)heartbeatInterval currentDateProviderBlock:(NSDate *(^)(void))currentDateProviderBlock; 92 | 93 | /** 94 | Create & schedule a timer for generating heartbeat events for a given identifier. 95 | Generated events are reported by calling delegate. 96 | 97 | Calling this method consecutively with the same argument has the same effect as calling it once. 98 | 99 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events should be 100 | generated for. 101 | */ 102 | - (void)startGeneratingHeartbeatForIdentifier:(NSString *)identifier; 103 | 104 | /** 105 | Invalidate and remove the timer for generating heartbeat events for given device. 106 | Stops calling delegate with events generated for this identifier. 107 | 108 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events generation 109 | should be stopped. 110 | */ 111 | - (void)stopGeneratingHeartbeatForIdentifier:(NSString *)identifier; 112 | 113 | @end 114 | 115 | NS_ASSUME_NONNULL_END 116 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/EstimoteProximitySDKPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | // Note: this file should be overwritten by build scripts in "Postprocessing" phase. 13 | 14 | #import "EPXGenericErrorFactory.h" 15 | #import "EPXProximityZoneStateChangeObserver.h" 16 | #import "EPXCachedAnalyticsSink.h" 17 | #import "EPXTimerAnalyticsHeartbeatGenerator.h" 18 | #import "EPXPersistentAnalyticsRepository.h" 19 | #import "EPXAnalyticsTrackEventsEntity.h" 20 | #import "EPXAnalyticsTrackEvent.h" 21 | #import "EPXEncryptedFramesRelay.h" 22 | #import "EPXTimerAnalyticsHeartbeatGenerator.h" 23 | #import "EPXAnalyticsSink.h" 24 | #import "EPXAnalyticsTrackEventsUploader.h" 25 | #import "EPXAnalyticsRepository.h" 26 | #import "EPXAnalyticsTrackEventsUploader.h" 27 | #import "AnalyticsTrackEventAdapter_Bridge.h" 28 | #import "EPXAnalyticsTimerFactory.h" 29 | #import "EPXEncryptedFramesRelayInternal_Bridge.h" 30 | #import "EPXSQLiteCreator.h" 31 | #import "EPXSQLiteTableInspector.h" 32 | #import "FMDB.h" 33 | #import "FMDatabaseAdditions.h" 34 | #import "EPXProximityZoneEngine.h" 35 | #import "EPXProximityObserverConfiguration+Internal.h" 36 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/FMDB.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double FMDBVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char FMDBVersionString[]; 5 | 6 | #import "FMDatabase_EPX.h" 7 | #import "FMResultSet_EPX.h" 8 | #import "FMDatabaseAdditions.h" 9 | #import "FMDatabaseQueue_EPX.h" 10 | #import "FMDatabasePool_EPX.h" 11 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64/EstimoteProximitySDK.framework/PrivateHeaders/FMDatabaseAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMDatabaseAdditions.h 3 | // fmdb 4 | // 5 | // Created by August Mueller on 10/30/05. 6 | // Copyright 2005 Flying Meat Inc.. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FMDatabase_EPX.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** Category of additions for `` class. 15 | 16 | ### See also 17 | 18 | - `` 19 | */ 20 | 21 | @interface FMDatabase_EPX (FMDatabaseAdditions) 22 | 23 | ///---------------------------------------- 24 | /// @name Return results of SQL to variable 25 | ///---------------------------------------- 26 | 27 | /** Return `int` value for query 28 | 29 | @param query The SQL query to be performed. 30 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 31 | 32 | @return `int` value. 33 | 34 | @note This is not available from Swift. 35 | */ 36 | 37 | - (int)intForQuery:(NSString*)query, ...; 38 | 39 | /** Return `long` value for query 40 | 41 | @param query The SQL query to be performed. 42 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 43 | 44 | @return `long` value. 45 | 46 | @note This is not available from Swift. 47 | */ 48 | 49 | - (long)longForQuery:(NSString*)query, ...; 50 | 51 | /** Return `BOOL` value for query 52 | 53 | @param query The SQL query to be performed. 54 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 55 | 56 | @return `BOOL` value. 57 | 58 | @note This is not available from Swift. 59 | */ 60 | 61 | - (BOOL)boolForQuery:(NSString*)query, ...; 62 | 63 | /** Return `double` value for query 64 | 65 | @param query The SQL query to be performed. 66 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 67 | 68 | @return `double` value. 69 | 70 | @note This is not available from Swift. 71 | */ 72 | 73 | - (double)doubleForQuery:(NSString*)query, ...; 74 | 75 | /** Return `NSString` value for query 76 | 77 | @param query The SQL query to be performed. 78 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 79 | 80 | @return `NSString` value. 81 | 82 | @note This is not available from Swift. 83 | */ 84 | 85 | - (NSString * _Nullable)stringForQuery:(NSString*)query, ...; 86 | 87 | /** Return `NSData` value for query 88 | 89 | @param query The SQL query to be performed. 90 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 91 | 92 | @return `NSData` value. 93 | 94 | @note This is not available from Swift. 95 | */ 96 | 97 | - (NSData * _Nullable)dataForQuery:(NSString*)query, ...; 98 | 99 | /** Return `NSDate` value for query 100 | 101 | @param query The SQL query to be performed. 102 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 103 | 104 | @return `NSDate` value. 105 | 106 | @note This is not available from Swift. 107 | */ 108 | 109 | - (NSDate * _Nullable)dateForQuery:(NSString*)query, ...; 110 | 111 | 112 | // Notice that there's no dataNoCopyForQuery:. 113 | // That would be a bad idea, because we close out the result set, and then what 114 | // happens to the data that we just didn't copy? Who knows, not I. 115 | 116 | 117 | ///-------------------------------- 118 | /// @name Schema related operations 119 | ///-------------------------------- 120 | 121 | /** Does table exist in database? 122 | 123 | @param tableName The name of the table being looked for. 124 | 125 | @return `YES` if table found; `NO` if not found. 126 | */ 127 | 128 | - (BOOL)tableExists:(NSString*)tableName; 129 | 130 | /** The schema of the database. 131 | 132 | This will be the schema for the entire database. For each entity, each row of the result set will include the following fields: 133 | 134 | - `type` - The type of entity (e.g. table, index, view, or trigger) 135 | - `name` - The name of the object 136 | - `tbl_name` - The name of the table to which the object references 137 | - `rootpage` - The page number of the root b-tree page for tables and indices 138 | - `sql` - The SQL that created the entity 139 | 140 | @return `FMResultSet` of schema; `nil` on error. 141 | 142 | @see [SQLite File Format](http://www.sqlite.org/fileformat.html) 143 | */ 144 | 145 | - (FMResultSet_EPX *)getSchema; 146 | 147 | /** The schema of the database. 148 | 149 | This will be the schema for a particular table as report by SQLite `PRAGMA`, for example: 150 | 151 | PRAGMA table_info('employees') 152 | 153 | This will report: 154 | 155 | - `cid` - The column ID number 156 | - `name` - The name of the column 157 | - `type` - The data type specified for the column 158 | - `notnull` - whether the field is defined as NOT NULL (i.e. values required) 159 | - `dflt_value` - The default value for the column 160 | - `pk` - Whether the field is part of the primary key of the table 161 | 162 | @param tableName The name of the table for whom the schema will be returned. 163 | 164 | @return `FMResultSet` of schema; `nil` on error. 165 | 166 | @see [table_info](http://www.sqlite.org/pragma.html#pragma_table_info) 167 | */ 168 | 169 | - (FMResultSet_EPX*)getTableSchema:(NSString*)tableName; 170 | 171 | /** Test to see if particular column exists for particular table in database 172 | 173 | @param columnName The name of the column. 174 | 175 | @param tableName The name of the table. 176 | 177 | @return `YES` if column exists in table in question; `NO` otherwise. 178 | */ 179 | 180 | - (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName; 181 | 182 | /** Test to see if particular column exists for particular table in database 183 | 184 | @param columnName The name of the column. 185 | 186 | @param tableName The name of the table. 187 | 188 | @return `YES` if column exists in table in question; `NO` otherwise. 189 | 190 | @see columnExists:inTableWithName: 191 | 192 | @warning Deprecated - use `` instead. 193 | */ 194 | 195 | - (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __deprecated_msg("Use columnExists:inTableWithName: instead"); 196 | 197 | 198 | /** Validate SQL statement 199 | 200 | This validates SQL statement by performing `sqlite3_prepare_v2`, but not returning the results, but instead immediately calling `sqlite3_finalize`. 201 | 202 | @param sql The SQL statement being validated. 203 | 204 | @param error This is a pointer to a `NSError` object that will receive the autoreleased `NSError` object if there was any error. If this is `nil`, no `NSError` result will be returned. 205 | 206 | @return `YES` if validation succeeded without incident; `NO` otherwise. 207 | 208 | */ 209 | 210 | - (BOOL)validateSQL:(NSString*)sql error:(NSError * _Nullable *)error; 211 | 212 | 213 | ///----------------------------------- 214 | /// @name Application identifier tasks 215 | ///----------------------------------- 216 | 217 | /** Retrieve application ID 218 | 219 | @return The `uint32_t` numeric value of the application ID. 220 | 221 | @see setApplicationID: 222 | */ 223 | 224 | @property (nonatomic) uint32_t applicationID; 225 | 226 | #if TARGET_OS_MAC && !TARGET_OS_IPHONE 227 | 228 | /** Retrieve application ID string 229 | 230 | @see setApplicationIDString: 231 | */ 232 | 233 | @property (nonatomic, retain) NSString *applicationIDString; 234 | 235 | #endif 236 | 237 | ///----------------------------------- 238 | /// @name user version identifier tasks 239 | ///----------------------------------- 240 | 241 | /** Retrieve user version 242 | 243 | @see setUserVersion: 244 | */ 245 | 246 | @property (nonatomic) uint32_t userVersion; 247 | 248 | @end 249 | 250 | NS_ASSUME_NONNULL_END 251 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/EstimoteProximitySDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/EstimoteProximitySDK -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Headers/EPXCloudCredentials.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Estimote Cloud credentials encapsulated in a value object. To acquire App ID & App Token go to 18 | https://cloud.estimote.com/#/apps. 19 | */ 20 | NS_SWIFT_NAME(CloudCredentials) 21 | @interface EPXCloudCredentials : NSObject 22 | 23 | /** 24 | App ID generated in Estimote Cloud. 25 | */ 26 | @property(nonatomic, strong, readonly) NSString *appID; 27 | 28 | /** 29 | App Token generated in Estimote Cloud. 30 | */ 31 | @property(nonatomic, strong, readonly) NSString *appToken; 32 | 33 | /** 34 | Init is disabled for this class. 35 | */ 36 | - (instancetype)init NS_UNAVAILABLE; 37 | 38 | /** 39 | New is disabled for this class. 40 | */ 41 | + (instancetype) new NS_UNAVAILABLE; 42 | 43 | /** 44 | Designated initializer. 45 | 46 | @param appID App ID generated in Estimote Cloud. 47 | @param appToken App Token generated in Estimote Cloud. 48 | */ 49 | - (instancetype)initWithAppID:(NSString *)appID appToken:(NSString *)appToken NS_DESIGNATED_INITIALIZER; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXCloudCredentials; 15 | @class EPXProximityZone; 16 | @class EPXProximityObserverConfiguration; 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | FOUNDATION_EXPORT NSString *const EPXProximityObserverErrorDomain; 21 | 22 | /** 23 | Possible errors invoked with Proximity Observer's error block. 24 | */ 25 | typedef NS_ENUM(NSUInteger, EPXProximityObserverError) { 26 | /* Unknown error probably due to a bug. If you're getting errors with this code please report it on 27 | * https://forums.estimote.com, using contact@estimote.com or filing an issue on Github. */ 28 | EPXProximityObserverErrorUnknown = 0, 29 | 30 | /* Fetching tags from Cloud failed. */ 31 | EPXProximityObserverErrorFetchingTagsFailed, 32 | 33 | /* Fetching attachments from Cloud failed. */ 34 | EPXProximityObserverErrorFetchingAttachmentsFailed, 35 | 36 | /* Bluetooth is unsupported on this iOS device. */ 37 | EPXProximityObserverErrorBluetoothUnsupported, 38 | 39 | /* Bluetooth is turned off. */ 40 | EPXProximityObserverErrorBluetoothOff, 41 | 42 | /* Couldn't use motion detection. */ 43 | EPXProximityObserverErrorMotionDetectionFailed, 44 | 45 | /* Core Location Services interferred with monitoring */ 46 | EPXProximityObserverErrorMonitoringNotPermitted 47 | }; 48 | 49 | /** 50 | Observes and reports proximity of Estimote devices. 51 | Uses Estimote Monitoring under the hood. Encapsulates it under tag-based beacon identification and callback blocks. 52 | */ 53 | NS_SWIFT_NAME(ProximityObserver) 54 | @interface EPXProximityObserver : NSObject 55 | 56 | /** 57 | Init is disabled for this class. 58 | */ 59 | - (instancetype)init NS_UNAVAILABLE; 60 | 61 | /** 62 | New is disabled for this class. 63 | */ 64 | + (instancetype) new NS_UNAVAILABLE; 65 | 66 | /** 67 | Convenience initializer. Calls designated initializer with default configuration. 68 | @param credentials Cloud Credentials object used to authorize requests sent to Estimote Cloud. 69 | @param errorBlock Block invoked whenever error occurs. The parameter is an NSError object, with 70 | domain equal to EPXProximityObserverErrorDomain and code from EPXProximityObserverError enum. 71 | */ 72 | - (instancetype)initWithCredentials:(EPXCloudCredentials *)credentials onError:(void (^)(NSError *error))errorBlock; 73 | 74 | /** 75 | Designated initializer. 76 | @param credentials Cloud Credentials object used to authorize requests sent to Estimote Cloud. 77 | @param configuration Proximity observer configuration that can be used for Proximity Observer's behaviour customization. 78 | @param errorBlock Block invoked whenever error occurs. The parameter is an NSError object, with 79 | domain equal to EPXProximityObserverErrorDomain and code from EPXProximityObserverError enum. 80 | */ 81 | - (instancetype)initWithCredentials:(EPXCloudCredentials *)credentials 82 | configuration:(EPXProximityObserverConfiguration *)configuration 83 | onError:(void (^)(NSError *error))errorBlock; 84 | 85 | /** 86 | Start observing and calling callbacks on provided proximity zones: 87 | - request device details for all user's devices from Estimote Cloud, 88 | - start Estimote Monitoring at registered ranges, 89 | - call registered enter/exit/change blocks when proximity event occurs. 90 | 91 | Subsequent calls of this method cause overwriting previously observed zones. 92 | 93 | @param zones Zones to be observed. 94 | */ 95 | - (void)startObservingZones:(NSArray *)zones; 96 | 97 | /** 98 | Stop observing and calling callbacks for all zones that were provided with -startObservingZones:, 99 | release memory resources allocated for monitoring the zones. 100 | 101 | Subsequent calls of this method (without re-starting observing zones) have the same effect as calling it just once. 102 | */ 103 | - (void)stopObservingZones; 104 | 105 | @end 106 | 107 | NS_ASSUME_NONNULL_END 108 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Headers/EPXProximityObserverConfiguration.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Defines logger level. 18 | */ 19 | typedef NS_ENUM(NSUInteger, EPXLogLevel) { 20 | /* Mute all logs. */ 21 | EPXLogLevelNone = 0, 22 | 23 | /* Log errors only. */ 24 | EPXLogLevelError = 1, 25 | 26 | /* Log errors and warnings. */ 27 | EPXLogLevelWarning = 2, 28 | 29 | /* Log errors, warnings and regular messages. */ 30 | EPXLogLevelInfo = 3 31 | }; 32 | 33 | /** 34 | Used to customize Proximity Observer behaviour. 35 | */ 36 | NS_SWIFT_NAME(ProximityObserverConfiguration) 37 | @interface EPXProximityObserverConfiguration : NSObject 38 | 39 | /** 40 | Creates a default Proximity Observer configuration object, which has `EPXLogLevelWarning` logs level, and enabled both requesting Core Location authorization and telemetry reporting. 41 | */ 42 | @property(nonatomic, strong, readonly, class) EPXProximityObserverConfiguration *defaultConfiguration; 43 | 44 | /** 45 | Logger level. Defines which logs generated by Estimote Proximity SDK are printed to the Xcode's console. 46 | */ 47 | @property(nonatomic, assign, readonly) EPXLogLevel logLevel; 48 | 49 | /** 50 | Indicates if SDK should request Core Location's authorization. 51 | */ 52 | @property(nonatomic, assign, readonly) BOOL requestsCLAuthorization; 53 | /** 54 | Indicates if full telemetry data will be reported to the Cloud. 55 | */ 56 | @property(nonatomic, assign, readonly) BOOL telemetryReportingEnabled; 57 | 58 | /** 59 | Convenience intializer for creating a custom configuration. 60 | 61 | @param logLevel Defines which logs will be printed. 62 | @param requestsCLAuthorization Indicates if Core Location authorization should be requested. 63 | @param telemetryReportingEnabled Indicates if telemetry reporting should be enabled. 64 | @return Initialized custom configuration. 65 | */ 66 | + (instancetype)customWithLogLevel:(EPXLogLevel)logLevel requestsCLAuthorization:(BOOL)requestsCLAuthorization telemetryReportingEnabled:(BOOL)telemetryReportingEnabled; 67 | 68 | @end 69 | 70 | NS_ASSUME_NONNULL_END 71 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Headers/EPXProximityRange.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Represents range of a proximity where enter/exit events should occur. 18 | 19 | Note: 20 | Due to BLE signal instability the actual place where notifications occur will differ. 21 | The `meanTriggerDistance` value defines the desired mean of distance at which events occur. 22 | 23 | The distance is rounded up to decimeters. Don't expect decimeter accuracy; this is only for simplification 24 | of EPXProximityRange objects comparison. 25 | */ 26 | NS_SWIFT_NAME(ProximityRange) 27 | @interface EPXProximityRange : NSObject 28 | 29 | /** 30 | Distance in meters where enter/exit events should occur passed in initializer rounded to decimeters (to 0.1). 31 | */ 32 | @property(nonatomic, assign, readonly) double desiredMeanTriggerDistance; 33 | 34 | /** 35 | Convenience factory for near range. Returns range with meanTriggerDistance set to 1m. 36 | 37 | It's a class property instead of class method to enable good-looking Swift code. 38 | */ 39 | @property(nonatomic, copy, readonly, class) EPXProximityRange *nearRange; 40 | 41 | /** 42 | Convenience factory for far range. Returns range with meanTriggerDistance set to 5m. 43 | 44 | It's a class property instead of class method to enable good-looking Swift code. 45 | */ 46 | @property(nonatomic, copy, readonly, class) EPXProximityRange *farRange; 47 | 48 | /** 49 | Init is disabled for this class. 50 | */ 51 | - (instancetype)init NS_UNAVAILABLE; 52 | 53 | /** 54 | New is disabled for this class. 55 | */ 56 | + (instancetype) new NS_UNAVAILABLE; 57 | 58 | /** 59 | Designated initializer. 60 | 61 | @param desiredMeanTriggerDistance Distance in meters where enter/exit events should occur rounded to decimeters (to 0.1). 62 | It has to be a non-negative number. 63 | 64 | @return Initialized object. Nil if passed desiredMeanTriggerDistance is negative. 65 | */ 66 | - (nullable instancetype)initWithDesiredMeanTriggerDistance:(double)desiredMeanTriggerDistance NS_DESIGNATED_INITIALIZER; 67 | 68 | /** 69 | Convenience factory method. Calls `-initWithMeanTriggerDistance:`. 70 | 71 | @param desiredMeanTriggerDistance Distance in meters where enter/exit events should occur rounded to decimeters (to 0.1). 72 | It has to be a non-negative number. 73 | 74 | @return Initialized object. Nil if passed desiredMeanTriggerDistance is negative. 75 | */ 76 | + (nullable instancetype)customRangeWithDesiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 77 | NS_SWIFT_NAME(custom(desiredMeanTriggerDistance:)); 78 | 79 | #pragma mark isEqual overrides 80 | - (BOOL)isEqualToRange:(EPXProximityRange *)otherRange; 81 | - (BOOL)isEqual:(nullable id)otherObject; 82 | - (NSUInteger)hash; 83 | 84 | @end 85 | 86 | NS_ASSUME_NONNULL_END 87 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Headers/EPXProximityZone.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | #import "EPXProximityRange.h" 14 | #import "EPXProximityZoneContext.h" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | /** 19 | Represents a logical zone. Is represented by range from a beacon and its tag. 20 | Can be spanned by one or more beacons. Beacon identification is tag-based 21 | (see https://github.com/Estimote/iOS-Proximity-SDK/blob/master/README.md for more info). 22 | */ 23 | NS_SWIFT_NAME(ProximityZone) 24 | @interface EPXProximityZone : NSObject 25 | 26 | /** 27 | Range where the action should be reported. 28 | */ 29 | @property(nonatomic, strong, readonly) EPXProximityRange *range; 30 | 31 | /** 32 | Tag assigned in Cloud to that zone. 33 | */ 34 | @property(nonatomic, readonly) NSString *tag; 35 | 36 | /** 37 | Register block to be called when user enters proximity of Estimote devices with matching tag. 38 | Beacon identification is tag-based (see https://github.com/Estimote/iOS-SDK/blob/sdk_5/README.md for more info). 39 | */ 40 | @property(nonatomic, copy, readwrite, nullable) void (^onEnter)(EPXProximityZoneContext *zoneContext); 41 | 42 | /** 43 | Block to be called when user exits proximity of Estimote devices with matching tag. 44 | Beacon identification is tag-based (see https://github.com/Estimote/iOS-SDK/blob/sdk_5/README.md for more info). 45 | */ 46 | @property(nonatomic, copy, readwrite, nullable) void (^onExit)(EPXProximityZoneContext *zoneContext); 47 | 48 | /** 49 | Block to be called each time a new beacon is detected in user's range and each time a beacon disappears 50 | from user's range. 51 | */ 52 | @property(nonatomic, copy, readwrite, nullable) void (^onContextChange)(NSSet *zoneContexts); 53 | 54 | /** 55 | Init is unavailable. 56 | */ 57 | - (instancetype)init NS_UNAVAILABLE; 58 | 59 | /** 60 | New is unavailable. 61 | */ 62 | + (instancetype) new NS_UNAVAILABLE; 63 | 64 | /** 65 | Designated initilizer. 66 | 67 | @param tag Tag name assigned to the zone. 68 | @param range Range where the action should be reported. 69 | */ 70 | - (instancetype)initWithTag:(NSString *)tag range:(EPXProximityRange *)range NS_DESIGNATED_INITIALIZER; 71 | 72 | @end 73 | 74 | NS_ASSUME_NONNULL_END 75 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Headers/EPXProximityZoneContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Interface providing all contextual data about a Proximity Zone. 18 | */ 19 | NS_SWIFT_NAME(ProximityZoneContext) 20 | @interface EPXProximityZoneContext: NSObject 21 | 22 | /** 23 | Identifier of a device that is the zone's source. 24 | */ 25 | @property (nonatomic, readonly) NSString *deviceIdentifier; 26 | /** 27 | Tag assigned in Cloud to that zone's source. 28 | */ 29 | @property (nonatomic, readonly) NSString *tag; 30 | /** 31 | Dictionary of attachments assigned in Cloud to that zone's source. 32 | */ 33 | @property (nonatomic, readonly) NSDictionary *attachments; 34 | 35 | - (instancetype)init NS_UNAVAILABLE; 36 | + (instancetype)new NS_UNAVAILABLE; 37 | 38 | /** 39 | Designated initializer. 40 | 41 | @param deviceIdentifier Zone's source. 42 | @param tag Zone's tag name. 43 | @param attachments Dicitionary of attachments. 44 | @return Initialized object. 45 | */ 46 | - (instancetype)initWithDeviceIdentifier:(NSString *)deviceIdentifier 47 | tag:(NSString *)tag 48 | attachments:(NSDictionary *)attachments NS_DESIGNATED_INITIALIZER; 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Headers/EstimoteProximitySDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | //! Project version number for EstimoteProximitySDK. 15 | FOUNDATION_EXPORT double EstimoteProximitySDKVersionNumber; 16 | 17 | //! Project version string for EstimoteProximitySDK. 18 | FOUNDATION_EXPORT const unsigned char EstimoteProximitySDKVersionString[]; 19 | 20 | // In this header, you should import all the public headers of your framework using statements like #import 21 | 22 | #import "EPXProximityObserver.h" 23 | #import "EPXProximityObserverConfiguration.h" 24 | #import "EPXProximityZone.h" 25 | #import "EPXProximityRange.h" 26 | #import "EPXCloudCredentials.h" 27 | #import "EPXProximityZoneContext.h" 28 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Info.plist -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface: -------------------------------------------------------------------------------- 1 | // swift-interface-format-version: 1.0 2 | // swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) 3 | // swift-module-flags: -target arm64-apple-ios10.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name EstimoteProximitySDK 4 | // swift-module-flags-ignorable: -enable-bare-slash-regex 5 | import CoreLocation.CLLocationManager 6 | import CoreLocation 7 | import CoreMotion 8 | import EstimoteBluetoothScanning.EBSScanInfo 9 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteEncrypted 10 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteLocation 11 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryA 12 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryB 13 | import EstimoteBluetoothScanning.EBSScanInfoLocationConnectivity 14 | import EstimoteBluetoothScanning 15 | @_exported import EstimoteProximitySDK 16 | import Foundation 17 | import Swift 18 | import UIKit.UIApplication 19 | import UIKit.UIDevice 20 | import UIKit 21 | import _Concurrency 22 | import _StringProcessing 23 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface: -------------------------------------------------------------------------------- 1 | // swift-interface-format-version: 1.0 2 | // swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) 3 | // swift-module-flags: -target arm64-apple-ios10.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name EstimoteProximitySDK 4 | // swift-module-flags-ignorable: -enable-bare-slash-regex 5 | import CoreLocation.CLLocationManager 6 | import CoreLocation 7 | import CoreMotion 8 | import EstimoteBluetoothScanning.EBSScanInfo 9 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteEncrypted 10 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteLocation 11 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryA 12 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryB 13 | import EstimoteBluetoothScanning.EBSScanInfoLocationConnectivity 14 | import EstimoteBluetoothScanning 15 | @_exported import EstimoteProximitySDK 16 | import Foundation 17 | import Swift 18 | import UIKit.UIApplication 19 | import UIKit.UIDevice 20 | import UIKit 21 | import _Concurrency 22 | import _StringProcessing 23 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface: -------------------------------------------------------------------------------- 1 | // swift-interface-format-version: 1.0 2 | // swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) 3 | // swift-module-flags: -target x86_64-apple-ios10.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name EstimoteProximitySDK 4 | // swift-module-flags-ignorable: -enable-bare-slash-regex 5 | import CoreLocation.CLLocationManager 6 | import CoreLocation 7 | import CoreMotion 8 | import EstimoteBluetoothScanning.EBSScanInfo 9 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteEncrypted 10 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteLocation 11 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryA 12 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryB 13 | import EstimoteBluetoothScanning.EBSScanInfoLocationConnectivity 14 | import EstimoteBluetoothScanning 15 | @_exported import EstimoteProximitySDK 16 | import Foundation 17 | import Swift 18 | import UIKit.UIApplication 19 | import UIKit.UIDevice 20 | import UIKit 21 | import _Concurrency 22 | import _StringProcessing 23 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/EstimoteProximitySDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface: -------------------------------------------------------------------------------- 1 | // swift-interface-format-version: 1.0 2 | // swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) 3 | // swift-module-flags: -target x86_64-apple-ios10.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name EstimoteProximitySDK 4 | // swift-module-flags-ignorable: -enable-bare-slash-regex 5 | import CoreLocation.CLLocationManager 6 | import CoreLocation 7 | import CoreMotion 8 | import EstimoteBluetoothScanning.EBSScanInfo 9 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteEncrypted 10 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteLocation 11 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryA 12 | import EstimoteBluetoothScanning.EBSScanInfoEstimoteTelemetryB 13 | import EstimoteBluetoothScanning.EBSScanInfoLocationConnectivity 14 | import EstimoteBluetoothScanning 15 | @_exported import EstimoteProximitySDK 16 | import Foundation 17 | import Swift 18 | import UIKit.UIApplication 19 | import UIKit.UIDevice 20 | import UIKit 21 | import _Concurrency 22 | import _StringProcessing 23 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | 11 | framework module EstimoteProximitySDK { 12 | umbrella header "EstimoteProximitySDK.h" 13 | 14 | export * 15 | module * { export * } 16 | 17 | framework module Private { 18 | umbrella header "EstimoteProximitySDKPrivate.h" 19 | 20 | export * 21 | module * { export * } 22 | } 23 | } 24 | 25 | 26 | module EstimoteProximitySDK.Swift { 27 | header "EstimoteProximitySDK-Swift.h" 28 | requires objc 29 | } 30 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/AnalyticsTrackEventAdapter_Bridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | @import Foundation; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @class EPXAnalyticsTrackEvent; 17 | @class EPXAnalyticsTrackEventsEntity; 18 | 19 | 20 | @interface EPXAnalyticsTrackEventAdapter : NSObject 21 | 22 | - (EPXAnalyticsTrackEvent *)trackEventFromEntity:(EPXAnalyticsTrackEventsEntity *)entity; 23 | - (EPXAnalyticsTrackEventsEntity *)entityFromTrackEvent:(EPXAnalyticsTrackEvent *)trackEvent; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsRepository.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #ifndef EPXAnalyticsRepository_h 13 | #define EPXAnalyticsRepository_h 14 | 15 | @import Foundation; 16 | 17 | @class EPXAnalyticsTrackEventsEntity; 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @protocol EPXAnalyticsRepository 22 | 23 | /** 24 | Opens or creates a file in "/com.estimote.EstimoteProximitySDK/analytics_events.sqlite". 25 | 26 | Checks if the file is a proper SQLite file and if the database contains tables with required schema. 27 | Overwrites the file if it's invalid, drops tables if the schema is invalid. 28 | Results in an open database object. 29 | 30 | @return YES if opening/creating database succeeded, NO otherwise. 31 | */ 32 | - (BOOL)setupDatabase; 33 | 34 | /** 35 | Inserts track event entity to the database. Requires database being set up before. 36 | 37 | @param event Event to save. 38 | */ 39 | - (void)saveEvent:(EPXAnalyticsTrackEventsEntity *)event; 40 | 41 | /** 42 | Retrieves a number of oldest events stored in the database. 43 | 44 | @param limit Number of events to retrieve. 45 | @return Retrieved events. 46 | */ 47 | - (NSArray *)findOldestEventsWithLimit:(NSInteger)limit; 48 | 49 | /** 50 | Delete from the database every event with timestamp smaller or equal to the one provided. 51 | 52 | @param timestampDate Date (its timeIntervalSince1970) that events' timestamps are compared with. 53 | */ 54 | - (void)deleteAllEventsBeforeOrAtTimestampDate:(NSDate *)timestampDate; 55 | 56 | /** 57 | Returns number of events stored in the database. 58 | */ 59 | - (NSUInteger)eventsCount; 60 | 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | 65 | #endif /* EPXAnalyticsRepository_h */ 66 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsSink.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #ifndef EPXAnalyticsSink_h 13 | #define EPXAnalyticsSink_h 14 | 15 | @class EPXAnalyticsTrackEvent; 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | 20 | @protocol EPXAnalyticsSink 21 | 22 | /* 23 | Transforms provided trackEventVO to entity consumable by the database, inserts the entity to the database, 24 | triggers track events batch upload if needed. 25 | */ 26 | - (void)addTrackEvent:(EPXAnalyticsTrackEvent *)trackEvent; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | 32 | #endif /* EPXAnalyticsSink_h */ 33 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTimerFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | 17 | @interface EPXAnalyticsTimerFactory : NSObject 18 | 19 | - (NSTimer *)makeScheduledTimerWithInterval:(NSTimeInterval)interval repeats:(BOOL)repeats block:(void (^)(NSTimer *))block; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTrackEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | typedef NS_ENUM(NSUInteger, EPXAnalyticsTrackEventEventType) { 15 | EPXAnalyticsTrackEventEventTypeUnknown = 0, 16 | EPXAnalyticsTrackEventEventTypeEnter, 17 | EPXAnalyticsTrackEventEventTypeExit, 18 | EPXAnalyticsTrackEventEventTypeHeartbeat 19 | }; 20 | 21 | typedef NS_ENUM(NSUInteger, EPXAnalyticsTrackEventPacketType) { 22 | EPXAnalyticsTrackEventPacketTypeUnknown = 0, 23 | EPXAnalyticsTrackEventPacketTypeEstimoteLocation 24 | }; 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @interface EPXAnalyticsTrackEvent : NSObject 29 | 30 | @property (nonatomic, strong, readonly) NSString *deviceIdentifier; 31 | @property (nonatomic, assign, readonly) EPXAnalyticsTrackEventEventType eventType; 32 | @property (nonatomic, assign, readonly) EPXAnalyticsTrackEventPacketType packetType; 33 | @property (nonatomic, assign, readonly) double expectedDistance; 34 | @property (nonatomic, assign, readonly) BOOL inForeground; 35 | @property (nonatomic, strong, readonly) NSUUID *distinctUUID; 36 | @property (nonatomic, strong, readonly) NSDate *date; 37 | 38 | - (instancetype)initWithDeviceIdentifier:(NSString *)deviceIdentifier 39 | eventType:(EPXAnalyticsTrackEventEventType)eventType 40 | packetType:(EPXAnalyticsTrackEventPacketType)packetType 41 | expectedDistance:(double)expectedDistance 42 | inForeground:(BOOL)inForeground 43 | distinctUUID:(NSUUID *)distinctUUID 44 | date:(NSDate *)date; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTrackEventsEntity.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | 17 | /** 18 | Represents a row in 'analytics_track_events' table in database created by EPXPersistentAnalyticsRepository. 19 | */ 20 | @interface EPXAnalyticsTrackEventsEntity : NSObject 21 | 22 | /** 23 | Packet type powering algorithm that analytics tracks (i.e. Estimote Location for Estimote Monitoring). 24 | */ 25 | @property (nonatomic, strong, readonly) NSString *packetIdentifier; 26 | 27 | /** 28 | Beacon-based event name that triggered analytics ping (i.e. enter). 29 | */ 30 | @property (nonatomic, strong, readonly) NSString *eventType; 31 | 32 | /** 33 | Packet name powering algorithm that analytics tracks (i.e. estimote_location for Estimote Monitoring). 34 | */ 35 | @property (nonatomic, strong, readonly) NSString *packetType; 36 | 37 | /** 38 | Distance where the notification was set to appear. 39 | */ 40 | @property (nonatomic, strong, readonly) NSNumber *expectedDistance; 41 | 42 | /** 43 | UNIX time in seconds. 44 | */ 45 | @property (nonatomic, strong, readonly) NSNumber *timestamp; 46 | 47 | /** 48 | Flag meaning application state. 49 | */ 50 | @property (nonatomic, strong, readonly) NSNumber *foreground; 51 | 52 | /** 53 | SDK-generated identifier used to identify end users (AKA "beacon consumers"). 54 | */ 55 | @property (nonatomic, strong, readonly) NSString *distinctID; 56 | 57 | - (instancetype)init NS_UNAVAILABLE; 58 | + (instancetype)new NS_UNAVAILABLE; 59 | 60 | 61 | /** 62 | Designated initalizer. 63 | 64 | @param packetIdentifier Packet type powering algorithm that analytics tracks (i.e. Estimote Location for Estimote Monitoring). 65 | @param eventType Beacon-based event name that triggered analytics ping (i.e. enter). 66 | @param packetType Packet name powering algorithm that analytics tracks (i.e. estimote_location for Estimote Monitoring). 67 | @param expectedDistance Distance where the notification was set to appear. 68 | @param timestamp UNIX time in seconds. 69 | @param foreground Flag meaning application state. 70 | @param distinctID SDK-generated identifier used to identify end users (AKA "beacon consumers"). 71 | */ 72 | - (instancetype)initWithPacketIdentifier:(NSString *)packetIdentifier eventType:(NSString *)eventType packetType:(NSString *)packetType expectedDistance:(NSNumber *)expectedDistance timestamp:(NSNumber *)timestamp foreground:(NSNumber *)foreground distinctID:(NSString *)distinctID NS_DESIGNATED_INITIALIZER; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXAnalyticsTrackEventsUploader.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #ifndef EPXAnalyticsTrackEventsUploader_h 13 | #define EPXAnalyticsTrackEventsUploader_h 14 | 15 | #import 16 | 17 | @class EPXAnalyticsTrackEvent; 18 | @class EPXCloudAnalyticsTrackEventsSender; 19 | @protocol EPXAnalyticsTrackEventsSender; 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @protocol EPXAnalyticsTrackEventsUploader 24 | 25 | /** 26 | Tells if an upload operation is in progress. 27 | 28 | Note: at the time of calling `-[delegate didUploadTrackEvents:]`, or `-[delegate didFailUploadingTrackEvents:afterFailedAttemptsCount:]` this property is still YES. 29 | */ 30 | - (BOOL)uploadIsInProgress; 31 | 32 | /** 33 | Sends a request to Cloud with provided track event. If the request fails, asks `decisionSource` if the request should be retried. 34 | 35 | Note: this method doesn't check if a batch upload is already happening. This should be done separately, using `-uploadIsInProgress`. 36 | 37 | @param trackEvents Array of track events to send in request as a batch. 38 | */ 39 | - (void)scheduleUploadingTrackEvents:(NSArray *)trackEvents; 40 | 41 | @end 42 | 43 | 44 | /** 45 | Asked by EPXAnalyticsTrackEventsUploader about policy on Cloud request retrial. 46 | */ 47 | @protocol EPXAnalyticsTrackEventsUploaderDecisionSource 48 | 49 | - (BOOL)shouldUploaderRetry:(id)uploader 50 | afterFailedAttemptsCount:(NSInteger)failedAttemptsCount 51 | whenRequestFailedWithError:(NSError *)requestError; 52 | 53 | @end 54 | 55 | /** 56 | Notified by EPXAnalyticsTrackEventsUploader when an upload succeeds or fails. 57 | */ 58 | @protocol EPXAnalyticsTrackEventsUploaderDelegate 59 | 60 | - (void)uploader:(id)uploader didUploadTrackEvents:(NSArray *)trackEventsVOs; 61 | 62 | // TODO: consider removing it if unused 63 | - (void)uploader:(id)uploader didFailUploadingTrackEvents:(NSArray *)trackEventsVOs afterFailedAttemptsCount:(NSInteger)failedAttemptsCount; 64 | 65 | @end 66 | 67 | NS_ASSUME_NONNULL_END 68 | 69 | #endif /* EPXAnalyticsTrackEventsUploader_h */ 70 | 71 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXCachedAnalyticsSink.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | #import "EPXAnalyticsSink.h" 14 | #import "EPXAnalyticsTrackEventsUploader.h" 15 | #import "EPXAnalyticsRepository.h" 16 | #import "EPXAnalyticsTrackEventsUploader.h" 17 | 18 | @class EPXAnalyticsTrackEvent; 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | /** 23 | Caches analytics events, persists them on disk, schedules uploading events to Cloud, clears uploaded events. 24 | */ 25 | @interface EPXCachedAnalyticsSink : NSObject 28 | 29 | /* 30 | Repository used to save and retrieve analytics events. 31 | */ 32 | @property (nonatomic, strong, readonly) id analyticsRepository; 33 | 34 | /* 35 | Number of events sent in each batch in analytics requests. 36 | * */ 37 | @property (nonatomic, assign, readonly) NSUInteger batchSize; 38 | 39 | - (instancetype)init NS_UNAVAILABLE; 40 | + (instancetype)new NS_UNAVAILABLE; 41 | 42 | - (instancetype)initWithAnalyticsRepository:(id)analyticsRepository 43 | trackEventsUploader:(id)trackEventsUploader 44 | batchSize:(NSUInteger)batchSize NS_DESIGNATED_INITIALIZER; 45 | 46 | /* 47 | Transforms provided trackEvent to entity consumable by the database, inserts the entity to the database, 48 | triggers track events batch upload if needed. 49 | */ 50 | - (void)addTrackEvent:(EPXAnalyticsTrackEvent *)trackEvent; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXEncryptedFramesRelay.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | FOUNDATION_EXPORT NSString * const EPXEncryptedFramesRelayErrorDomain; 17 | 18 | /** 19 | Possible errors passed by EPXEncryptedFramesRelayDelegate. 20 | */ 21 | typedef NS_ENUM(NSInteger, EPXEncryptedFramesRelayError) { 22 | /* Unknown error probably due to a bug. */ 23 | EPXEncryptedFramesRelayErrorUnknown = 0, 24 | 25 | EPXEncryptedFramesRelayErrorURLSessionFailed = -1, 26 | EPXEncryptedFramesRelayErrorInvalidResponse = -2, 27 | 28 | EPXEncryptedFramesRelayErrorInvalidRequest = 400, 29 | EPXEncryptedFramesRelayErrorUnauthorized = 401, 30 | EPXEncryptedFramesRelayErrorNotFound = 404, 31 | EPXEncryptedFramesRelayErrorInternalSeverError = 500 32 | }; 33 | 34 | @class EPXEncryptedFramesRelay; 35 | @class EPXCloudCredentials; 36 | 37 | @protocol EPXEncryptedFramesRelayDelegate 38 | 39 | - (void)relay:(EPXEncryptedFramesRelay *)relay didFetchTitle:(nullable NSString *)title withError:(nullable NSError *)error; 40 | 41 | @end 42 | 43 | /** 44 | Handles beacon monitoring, sending payloads to backend service and fetching venue title to show on screen. 45 | */ 46 | @interface EPXEncryptedFramesRelay : NSObject 47 | 48 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 49 | cloudCredentials:(EPXCloudCredentials *)cloudCredentials 50 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 51 | delegate:(nullable id)delegate; 52 | 53 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 54 | bearerToken:(NSString *)bearerToken 55 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 56 | delegate:(id)delegate; 57 | 58 | - (void)start; 59 | - (void)stop; 60 | 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | 65 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXEncryptedFramesRelayInternal_Bridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface EPXEncryptedFramesRelayInternal : NSObject 17 | 18 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 19 | cloudCredentials:(EPXCloudCredentials *)cloudCredentials 20 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 21 | didFetchTitleBlock:(void (^)(NSString * _Nullable, NSError * _Nullable ))didFetchTitleBlock; 22 | 23 | - (instancetype)initWithBackendURL:(NSURL *)backendURL 24 | bearerToken:(NSString *)bearerToken 25 | desiredMeanTriggerDistance:(double)desiredMeanTriggerDistance 26 | didFetchTitleBlock:(void (^)(NSString * _Nullable, NSError * _Nullable ))didFetchTitleBlock; 27 | 28 | - (void)start; 29 | - (void)stop; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXGenericErrorFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /* 17 | Simplifies creation of NSErrors. 18 | */ 19 | @interface EPXGenericErrorFactory : NSObject 20 | 21 | /* 22 | Constructs NSError object with domain, code and user info with proper keys. 23 | */ 24 | + (NSError *)makeErrorWithDomain:(NSString *)domain 25 | code:(NSInteger)code 26 | description:(nullable NSString *)description 27 | recovery:(nullable NSString *)recovery 28 | underlyingError:(nullable NSError *)underlyingError; 29 | 30 | @end 31 | 32 | NS_ASSUME_NONNULL_END 33 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXPersistentAnalyticsRepository.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | #import "EPXAnalyticsRepository.h" 14 | 15 | @class FMDatabase_EPX; 16 | @class EPXSQLiteCreator; 17 | @class EPXSQLiteTableInspector; 18 | @class EPXAnalyticsTrackEventsEntity; 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | 23 | /** 24 | Persists analytics events on disk with a SQLite database. 25 | */ 26 | @interface EPXPersistentAnalyticsRepository : NSObject 27 | 28 | @property (nonatomic, strong, readonly) FMDatabase_EPX *database; 29 | 30 | /** 31 | Convenience initializer. 32 | */ 33 | - (instancetype)init; 34 | 35 | /** 36 | Designated initializer. 37 | 38 | @param sqliteCreator Creator object used to initialize database file. 39 | @param fileManager File manager used to generate database URL. 40 | @param tableInspector Inspector used to check if database has proper table schema. 41 | */ 42 | - (instancetype)initWithSqliteCreator:(EPXSQLiteCreator *)sqliteCreator fileManager:(NSFileManager *)fileManager tableInspector:(EPXSQLiteTableInspector *)tableInspector NS_DESIGNATED_INITIALIZER; 43 | 44 | /** 45 | Opens or creates a file in "/com.estimote.EstimoteProximitySDK/analytics_events.sqlite". 46 | 47 | Checks if the file is a proper SQLite file and if the database contains tables with required schema. 48 | Overwrites the file if it's invalid, drops tables if the schema is invalid. 49 | Results in an open database object. 50 | 51 | @return YES if opening/creating database succeeded, NO otherwise. 52 | */ 53 | - (BOOL)setupDatabase; 54 | 55 | /** 56 | Inserts track event entity to the database. Requires database being set up before. 57 | 58 | @param event Event to save. 59 | */ 60 | - (void)saveEvent:(EPXAnalyticsTrackEventsEntity *)event; 61 | 62 | /** 63 | Retrieves a number of oldest events stored in the database. 64 | 65 | @param limit Number of events to retrieve. 66 | @return Retrieved events. 67 | */ 68 | - (NSArray *)findOldestEventsWithLimit:(NSInteger)limit; 69 | 70 | /** 71 | Delete from the database every event with timestamp smaller or equal to the one provided. 72 | 73 | @param timestampDate Date (its timeIntervalSince1970) that events' timestamps are compared with. 74 | */ 75 | - (void)deleteAllEventsBeforeOrAtTimestampDate:(NSDate *)timestampDate; 76 | 77 | /** 78 | Returns number of events stored in the database. 79 | */ 80 | - (NSUInteger)eventsCount; 81 | 82 | @end 83 | 84 | NS_ASSUME_NONNULL_END 85 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXProximityObserverConfiguration+Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | @import Foundation; 13 | 14 | @interface EPXProximityObserverConfiguration (Internal) 15 | 16 | @property (nonatomic, nullable) NSURL *sensorsDataFlushDirectoryURL; 17 | @property (nonatomic, nullable) NSURL *sensorsDataReplayFileURL; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXProximityZoneEngine.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXProximityZone; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | /** 19 | Encapsulates decision making on whether a tag fits a given zone, or whether tag insertion/removal 20 | should trigger callbacks. 21 | */ 22 | @interface EPXProximityZoneEngine : NSObject 23 | 24 | /** 25 | Decides whether the provided tag matches given zone. 26 | 27 | @param tag Tag to be tested. 28 | @param zone Zone to be tested against. 29 | @return YES if tag matches the tag provided with the zone. 30 | */ 31 | - (BOOL)tag:(NSString *)tag matchesZone:(EPXProximityZone *)zone; 32 | 33 | /** 34 | Decides whether inserting new tag should trigger an enter callback. 35 | 36 | @param tagsInside Set of tags inside zone before insertion. 37 | @return YES if tagsInside contains no entries. 38 | */ 39 | - (BOOL)insertionToTagsSetShouldTriggerEnter:(NSSet *)tagsInside; 40 | 41 | /** 42 | Decides whether removing tag should trigger an exit callback. 43 | 44 | @param tagToRemove Tag to be removed from collection. 45 | @param tagsInside Set of tags inside zone before removal. 46 | @return YES if tagsInside contains exactly one object and it's equal to `tagToRemove`. 47 | */ 48 | - (BOOL)shouldTriggerExitWhenRemovingTag:(NSString *)tagToRemove fromTagsSet:(NSSet *)tagsInside; 49 | 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | 54 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXProximityZoneStateChangeObserver.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXProximityZone; 15 | @class EPXProximityZoneEngine; 16 | @class EPXProximityZoneContext; 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | @protocol EPXProximityZoneContextStore 21 | 22 | /** 23 | Proximity zone this object wraps and holds state for. 24 | */ 25 | @property (nonatomic, strong, readonly) EPXProximityZone *proximityZone; 26 | 27 | - (void)insertZoneContext:(EPXProximityZoneContext *)context; 28 | - (void)removeZoneContext:(EPXProximityZoneContext *)context; 29 | 30 | @end 31 | 32 | /** 33 | Wraps a Proximity Zone to hold state of contexts that are currently inside the zone (`zoneContextsInside`). 34 | Additionally, allows to insert a context to the zone or remove it. Calls zone's registered callback if needed. 35 | */ 36 | @interface EPXProximityZoneStateChangeObserver : NSObject 37 | 38 | /** 39 | Proximity zone this object wraps and holds state for. 40 | */ 41 | @property (nonatomic, strong, readonly) EPXProximityZone *proximityZone; 42 | 43 | /** 44 | Proximity Zone Engine used for decisions on when enter/exit/change handlers should be called. 45 | */ 46 | @property (nonatomic, strong, readonly) EPXProximityZoneEngine *engine; 47 | 48 | /** 49 | Set of `EPXProximityZoneContext`s related to beacons that are currently within range. 50 | */ 51 | @property (nonatomic, strong, readonly) NSSet *zoneContextsInside; 52 | 53 | /** 54 | Init is unavailable. 55 | */ 56 | - (instancetype)init NS_UNAVAILABLE; 57 | /** 58 | New is unavailable. 59 | */ 60 | + (instancetype)new NS_UNAVAILABLE; 61 | 62 | /** 63 | Designated initalizer. 64 | 65 | @param zone Proximity Zone to hold state for. 66 | @param engine Proximity Zone Engine used for decisions on when enter/exit/change handlers should be called. 67 | */ 68 | - (instancetype)initWithZone:(EPXProximityZone *)zone 69 | engine:(EPXProximityZoneEngine *)engine NS_DESIGNATED_INITIALIZER; 70 | 71 | /** 72 | Check whether provided zone's context matches the zone, inserts it into `zoneContextsInside` set and calls `proximityZone`'s callbacks if necessary. 73 | Asks `engine` to decide whether enter/exit/change callbacks should happen. 74 | 75 | @param context Zone's context to be inserted. 76 | */ 77 | - (void)insertZoneContextAndCallHandlerIfNeeded:(EPXProximityZoneContext *)context; 78 | 79 | /** 80 | Check whether provided zone's context matches the zone, removes it from `zoneContextsInside` set and calls `proximityZone`'s callbacks if necessary. 81 | Asks `engine` to decide whether enter/exit/change callbacks should happen. 82 | 83 | @param context Zone's context to be removed. 84 | */ 85 | - (void)removeZoneContextAndCallHandlerIfNeeded:(EPXProximityZoneContext *)context; 86 | 87 | @end 88 | 89 | NS_ASSUME_NONNULL_END 90 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXSQLiteCreator.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class FMDatabase_EPX; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | 19 | /** 20 | Opens, creates or overwrites SQLite file at given path and provides a FMDatabase object. 21 | */ 22 | @interface EPXSQLiteCreator : NSObject 23 | 24 | /** 25 | Unavailable 26 | */ 27 | - (instancetype)init NS_UNAVAILABLE; 28 | 29 | /** 30 | Unavailable 31 | */ 32 | + (instancetype)new NS_UNAVAILABLE; 33 | 34 | /** 35 | Designated initializer. 36 | 37 | @param fileManager File manager object used to create enclosing directory and remove invalid file at provided URL. 38 | */ 39 | - (instancetype)initWithFileManager:(NSFileManager *)fileManager NS_DESIGNATED_INITIALIZER; 40 | 41 | /** 42 | Attempts to open SQLite file at given URL. Creates enclosing directory if needed. Removes file at given URL if it isn't 43 | a valid SQLite database file. Calls -open on the database object before returning. 44 | 45 | @param databaseURL URL of database file to open. 46 | @return Open database object. Nil if couldn't create parent directory, remove invalid file 47 | or failed to init and open database file properly. 48 | */ 49 | - (nullable FMDatabase_EPX *)openOrOverwriteDatabaseAtURL:(NSURL *)databaseURL; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXSQLiteTableInspector.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class FMDatabase_EPX; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | 19 | /** 20 | Checks database table schema. 21 | */ 22 | @interface EPXSQLiteTableInspector : NSObject 23 | 24 | /** 25 | Query the database for table schema using "PRAGMA table_info();" SQL query. 26 | 27 | From https://sqlite.org/pragma.html#pragma_table_info : 28 | This pragma returns one row for each column in the named table. Columns in the result set include the column name, 29 | data type, whether or not the column can be NULL, and the default value for the column. The "pk" column in the result 30 | set is zero for columns that are not part of the primary key, and is the index of the column in the primary key for 31 | columns that are part of the primary key. 32 | 33 | @param tableName Table to inspect. 34 | @param database Database object to execute the query on. 35 | @return Array of dictionaries. Each table column results in one dictionary. 36 | */ 37 | - (NSArray *> *)tableColumnInfoDictionariesForTableNamed:(NSString *)tableName 38 | inDatabase:(FMDatabase_EPX *)database; 39 | 40 | 41 | /** 42 | Checks whether the column info dictionaries matches pattern. 43 | The pattern is defined by a dictionary where a key is column name, and a value is expected column type. 44 | SQLite column types are "TEXT", "NUMERIC", "INTEGER", "REAL", "BLOB". 45 | 46 | @param columnInfos Column info dictionaries to be checked, one dictionary per column. 47 | @param columnNameTypes Column name to column type pattern to check against. 48 | @return YES if each column name from columnNameTypes exists in columnInfos 49 | and type of that column matches the type in columnNameTypes value. 50 | */ 51 | - (BOOL)schemaWithColumnInfos:(NSArray *> *)columnInfos 52 | matchesColumnNameTypes:(NSDictionary *)columnNameTypes; 53 | 54 | @end 55 | 56 | NS_ASSUME_NONNULL_END 57 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EPXTimerAnalyticsHeartbeatGenerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | #import 13 | 14 | @class EPXAnalyticsTimerFactory; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | 19 | @protocol EPXAnalyticsHeartbeatGenerator 20 | 21 | /** 22 | All identifiers registered using `-startGeneratingHeartbeatForIdentifier:`. 23 | Calling `-stopGeneratingHeartbeatForIdentifier:` removes the identifier from this collection. 24 | */ 25 | @property (nonatomic, strong, readonly) NSSet *heartbeatIdentifiers; 26 | 27 | /** 28 | Create & schedule a timer for generating heartbeat events for a given identifier. 29 | Generated events are reported by calling delegate. 30 | 31 | Calling this method consecutively with the same argument has the same effect as calling it once. 32 | 33 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events should be 34 | generated for. 35 | */ 36 | - (void)startGeneratingHeartbeatForIdentifier:(NSString *)identifier; 37 | 38 | /** 39 | Invalidate and remove the timer for generating heartbeat events for given device. 40 | Stops calling delegate with events generated for this identifier. 41 | 42 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events generation 43 | should be stopped. 44 | */ 45 | - (void)stopGeneratingHeartbeatForIdentifier:(NSString *)identifier; 46 | 47 | @end 48 | 49 | 50 | @protocol EPXAnalyticsHeartbeatGeneratorDelegate 51 | 52 | /** 53 | Tells the delegate that heartbeat generator's timer generated a tick. 54 | @param heartbeatGenerator Object that triggered the heartbeat event. 55 | @param heartbeatDate Date of the heartbeat event. 56 | @param identifier Identifier that was used to start generating heartbeat events. 57 | */ 58 | - (void)heartbeatGenerator:(id)heartbeatGenerator 59 | didBeatAtDate:(NSDate *)heartbeatDate 60 | forIdentifier:(NSString *)identifier; 61 | 62 | @end 63 | 64 | 65 | @interface EPXTimerAnalyticsHeartbeatGenerator : NSObject 66 | 67 | /** 68 | All identifiers registered using `-startGeneratingHeartbeatForIdentifier:`. 69 | Calling `-stopGeneratingHeartbeatForIdentifier:` removes the identifier from this collection. 70 | */ 71 | @property (nonatomic, strong, readonly) NSSet *heartbeatIdentifiers; 72 | @property (nonatomic, weak, readwrite) id delegate; 73 | 74 | - (instancetype)init NS_UNAVAILABLE; 75 | + (instancetype)new NS_UNAVAILABLE; 76 | 77 | /** 78 | Designated initializer. 79 | @param timerFactory Timer factory used to create NSTimer objects. 80 | @param heartbeatInterval Interval at which timers are set to fire. 81 | @param currentDateProviderBlock Block used to determine current date when calling the delegate. 82 | @param delegate Delegate object to call on timer ticks. 83 | */ 84 | - (instancetype)initWithTimerFactory:(EPXAnalyticsTimerFactory *)timerFactory heartbeatInterval:(NSTimeInterval)heartbeatInterval currentDateProviderBlock:(NSDate *(^)(void))currentDateProviderBlock delegate:(nullable id )delegate; 85 | 86 | /** 87 | Convenience initializer. Calls designated initializer with newly created timer factory & nil delegate. 88 | @param heartbeatInterval Interval at which timers are set to fire. 89 | @param currentDateProviderBlock Block used to determine current date when calling the delegate. 90 | */ 91 | - (instancetype)initWithHeartbeatInterval:(NSTimeInterval)heartbeatInterval currentDateProviderBlock:(NSDate *(^)(void))currentDateProviderBlock; 92 | 93 | /** 94 | Create & schedule a timer for generating heartbeat events for a given identifier. 95 | Generated events are reported by calling delegate. 96 | 97 | Calling this method consecutively with the same argument has the same effect as calling it once. 98 | 99 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events should be 100 | generated for. 101 | */ 102 | - (void)startGeneratingHeartbeatForIdentifier:(NSString *)identifier; 103 | 104 | /** 105 | Invalidate and remove the timer for generating heartbeat events for given device. 106 | Stops calling delegate with events generated for this identifier. 107 | 108 | @param identifier String used to identify timers, i.e. device identifier of the beacon that heartbeat events generation 109 | should be stopped. 110 | */ 111 | - (void)stopGeneratingHeartbeatForIdentifier:(NSString *)identifier; 112 | 113 | @end 114 | 115 | NS_ASSUME_NONNULL_END 116 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/EstimoteProximitySDKPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ____ _ _ _ ____ ____ _ __ 3 | // | _ \ _ __ _____ _(_)_ __ ___ (_) |_ _ _ / ___|| _ \| |/ / 4 | // | |_) | '__/ _ \ \/ / | '_ ` _ \| | __| | | | \___ \| | | | ' / 5 | // | __/| | | (_) > <| | | | | | | | |_| |_| | ___) | |_| | . \ 6 | // |_| |_| \___/_/\_\_|_| |_| |_|_|\__|\__, | |____/|____/|_|\_\ 7 | // |___/ 8 | // 9 | // Copyright © 2017 Estimote. All rights reserved. 10 | // 11 | 12 | // Note: this file should be overwritten by build scripts in "Postprocessing" phase. 13 | 14 | #import "EPXGenericErrorFactory.h" 15 | #import "EPXProximityZoneStateChangeObserver.h" 16 | #import "EPXCachedAnalyticsSink.h" 17 | #import "EPXTimerAnalyticsHeartbeatGenerator.h" 18 | #import "EPXPersistentAnalyticsRepository.h" 19 | #import "EPXAnalyticsTrackEventsEntity.h" 20 | #import "EPXAnalyticsTrackEvent.h" 21 | #import "EPXEncryptedFramesRelay.h" 22 | #import "EPXTimerAnalyticsHeartbeatGenerator.h" 23 | #import "EPXAnalyticsSink.h" 24 | #import "EPXAnalyticsTrackEventsUploader.h" 25 | #import "EPXAnalyticsRepository.h" 26 | #import "EPXAnalyticsTrackEventsUploader.h" 27 | #import "AnalyticsTrackEventAdapter_Bridge.h" 28 | #import "EPXAnalyticsTimerFactory.h" 29 | #import "EPXEncryptedFramesRelayInternal_Bridge.h" 30 | #import "EPXSQLiteCreator.h" 31 | #import "EPXSQLiteTableInspector.h" 32 | #import "FMDB.h" 33 | #import "FMDatabaseAdditions.h" 34 | #import "EPXProximityZoneEngine.h" 35 | #import "EPXProximityObserverConfiguration+Internal.h" 36 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/FMDB.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double FMDBVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char FMDBVersionString[]; 5 | 6 | #import "FMDatabase_EPX.h" 7 | #import "FMResultSet_EPX.h" 8 | #import "FMDatabaseAdditions.h" 9 | #import "FMDatabaseQueue_EPX.h" 10 | #import "FMDatabasePool_EPX.h" 11 | -------------------------------------------------------------------------------- /EstimoteProximitySDK/EstimoteProximitySDK.xcframework/ios-arm64_x86_64-simulator/EstimoteProximitySDK.framework/PrivateHeaders/FMDatabaseAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // FMDatabaseAdditions.h 3 | // fmdb 4 | // 5 | // Created by August Mueller on 10/30/05. 6 | // Copyright 2005 Flying Meat Inc.. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FMDatabase_EPX.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** Category of additions for `` class. 15 | 16 | ### See also 17 | 18 | - `` 19 | */ 20 | 21 | @interface FMDatabase_EPX (FMDatabaseAdditions) 22 | 23 | ///---------------------------------------- 24 | /// @name Return results of SQL to variable 25 | ///---------------------------------------- 26 | 27 | /** Return `int` value for query 28 | 29 | @param query The SQL query to be performed. 30 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 31 | 32 | @return `int` value. 33 | 34 | @note This is not available from Swift. 35 | */ 36 | 37 | - (int)intForQuery:(NSString*)query, ...; 38 | 39 | /** Return `long` value for query 40 | 41 | @param query The SQL query to be performed. 42 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 43 | 44 | @return `long` value. 45 | 46 | @note This is not available from Swift. 47 | */ 48 | 49 | - (long)longForQuery:(NSString*)query, ...; 50 | 51 | /** Return `BOOL` value for query 52 | 53 | @param query The SQL query to be performed. 54 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 55 | 56 | @return `BOOL` value. 57 | 58 | @note This is not available from Swift. 59 | */ 60 | 61 | - (BOOL)boolForQuery:(NSString*)query, ...; 62 | 63 | /** Return `double` value for query 64 | 65 | @param query The SQL query to be performed. 66 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 67 | 68 | @return `double` value. 69 | 70 | @note This is not available from Swift. 71 | */ 72 | 73 | - (double)doubleForQuery:(NSString*)query, ...; 74 | 75 | /** Return `NSString` value for query 76 | 77 | @param query The SQL query to be performed. 78 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 79 | 80 | @return `NSString` value. 81 | 82 | @note This is not available from Swift. 83 | */ 84 | 85 | - (NSString * _Nullable)stringForQuery:(NSString*)query, ...; 86 | 87 | /** Return `NSData` value for query 88 | 89 | @param query The SQL query to be performed. 90 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 91 | 92 | @return `NSData` value. 93 | 94 | @note This is not available from Swift. 95 | */ 96 | 97 | - (NSData * _Nullable)dataForQuery:(NSString*)query, ...; 98 | 99 | /** Return `NSDate` value for query 100 | 101 | @param query The SQL query to be performed. 102 | @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. 103 | 104 | @return `NSDate` value. 105 | 106 | @note This is not available from Swift. 107 | */ 108 | 109 | - (NSDate * _Nullable)dateForQuery:(NSString*)query, ...; 110 | 111 | 112 | // Notice that there's no dataNoCopyForQuery:. 113 | // That would be a bad idea, because we close out the result set, and then what 114 | // happens to the data that we just didn't copy? Who knows, not I. 115 | 116 | 117 | ///-------------------------------- 118 | /// @name Schema related operations 119 | ///-------------------------------- 120 | 121 | /** Does table exist in database? 122 | 123 | @param tableName The name of the table being looked for. 124 | 125 | @return `YES` if table found; `NO` if not found. 126 | */ 127 | 128 | - (BOOL)tableExists:(NSString*)tableName; 129 | 130 | /** The schema of the database. 131 | 132 | This will be the schema for the entire database. For each entity, each row of the result set will include the following fields: 133 | 134 | - `type` - The type of entity (e.g. table, index, view, or trigger) 135 | - `name` - The name of the object 136 | - `tbl_name` - The name of the table to which the object references 137 | - `rootpage` - The page number of the root b-tree page for tables and indices 138 | - `sql` - The SQL that created the entity 139 | 140 | @return `FMResultSet` of schema; `nil` on error. 141 | 142 | @see [SQLite File Format](http://www.sqlite.org/fileformat.html) 143 | */ 144 | 145 | - (FMResultSet_EPX *)getSchema; 146 | 147 | /** The schema of the database. 148 | 149 | This will be the schema for a particular table as report by SQLite `PRAGMA`, for example: 150 | 151 | PRAGMA table_info('employees') 152 | 153 | This will report: 154 | 155 | - `cid` - The column ID number 156 | - `name` - The name of the column 157 | - `type` - The data type specified for the column 158 | - `notnull` - whether the field is defined as NOT NULL (i.e. values required) 159 | - `dflt_value` - The default value for the column 160 | - `pk` - Whether the field is part of the primary key of the table 161 | 162 | @param tableName The name of the table for whom the schema will be returned. 163 | 164 | @return `FMResultSet` of schema; `nil` on error. 165 | 166 | @see [table_info](http://www.sqlite.org/pragma.html#pragma_table_info) 167 | */ 168 | 169 | - (FMResultSet_EPX*)getTableSchema:(NSString*)tableName; 170 | 171 | /** Test to see if particular column exists for particular table in database 172 | 173 | @param columnName The name of the column. 174 | 175 | @param tableName The name of the table. 176 | 177 | @return `YES` if column exists in table in question; `NO` otherwise. 178 | */ 179 | 180 | - (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName; 181 | 182 | /** Test to see if particular column exists for particular table in database 183 | 184 | @param columnName The name of the column. 185 | 186 | @param tableName The name of the table. 187 | 188 | @return `YES` if column exists in table in question; `NO` otherwise. 189 | 190 | @see columnExists:inTableWithName: 191 | 192 | @warning Deprecated - use `` instead. 193 | */ 194 | 195 | - (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __deprecated_msg("Use columnExists:inTableWithName: instead"); 196 | 197 | 198 | /** Validate SQL statement 199 | 200 | This validates SQL statement by performing `sqlite3_prepare_v2`, but not returning the results, but instead immediately calling `sqlite3_finalize`. 201 | 202 | @param sql The SQL statement being validated. 203 | 204 | @param error This is a pointer to a `NSError` object that will receive the autoreleased `NSError` object if there was any error. If this is `nil`, no `NSError` result will be returned. 205 | 206 | @return `YES` if validation succeeded without incident; `NO` otherwise. 207 | 208 | */ 209 | 210 | - (BOOL)validateSQL:(NSString*)sql error:(NSError * _Nullable *)error; 211 | 212 | 213 | ///----------------------------------- 214 | /// @name Application identifier tasks 215 | ///----------------------------------- 216 | 217 | /** Retrieve application ID 218 | 219 | @return The `uint32_t` numeric value of the application ID. 220 | 221 | @see setApplicationID: 222 | */ 223 | 224 | @property (nonatomic) uint32_t applicationID; 225 | 226 | #if TARGET_OS_MAC && !TARGET_OS_IPHONE 227 | 228 | /** Retrieve application ID string 229 | 230 | @see setApplicationIDString: 231 | */ 232 | 233 | @property (nonatomic, retain) NSString *applicationIDString; 234 | 235 | #endif 236 | 237 | ///----------------------------------- 238 | /// @name user version identifier tasks 239 | ///----------------------------------- 240 | 241 | /** Retrieve user version 242 | 243 | @see setUserVersion: 244 | */ 245 | 246 | @property (nonatomic) uint32_t userVersion; 247 | 248 | @end 249 | 250 | NS_ASSUME_NONNULL_END 251 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.7 2 | import PackageDescription 3 | 4 | 5 | let package = Package( 6 | name: "EstimoteProximitySDK", 7 | platforms: [ 8 | .iOS(.v10) 9 | ], 10 | products: [ 11 | .library( 12 | name: "EstimoteProximitySDK", 13 | targets: [ 14 | "EstimoteProximitySDK" 15 | ] 16 | ) 17 | ], 18 | targets: [ 19 | .binaryTarget( 20 | name: "EstimoteProximitySDK", 21 | path: "./EstimoteProximitySDK/EstimoteProximitySDK.xcframework" 22 | ) 23 | ] 24 | ) -------------------------------------------------------------------------------- /docs/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

EstimoteProximitySDK Docs (70% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 80 |
81 |
82 |
83 |

Enumerations

84 |

The following enumerations are available globally.

85 | 86 |
87 |
88 |
89 |
    90 |
  • 91 |
    92 | 93 | 94 | 95 | EPXProximityObserverError 96 | 97 |
    98 |
    99 |
    100 |
    101 |
    102 |
    103 |

    Possible errors invoked with Proximity Observer’s error block.

    104 | 105 | See more 106 |
    107 |
    108 |

    Declaration

    109 |
    110 |

    Objective-C

    111 |
    enum EPXProximityObserverError {}
    112 | 113 |
    114 |
    115 |

    Swift

    116 |
    enum EPXProximityObserverError : UInt
    117 | 118 |
    119 |
    120 |
    121 |
    122 |
  • 123 |
124 |
125 |
126 |
    127 |
  • 128 |
    129 | 130 | 131 | 132 | EPXLogLevel 133 | 134 |
    135 |
    136 |
    137 |
    138 |
    139 |
    140 |

    Defines logger level.

    141 | 142 | See more 143 |
    144 |
    145 |

    Declaration

    146 |
    147 |

    Objective-C

    148 |
    enum EPXLogLevel {}
    149 | 150 |
    151 |
    152 |

    Swift

    153 |
    enum EPXLogLevel : UInt
    154 | 155 |
    156 |
    157 |
    158 |
    159 |
  • 160 |
161 |
162 |
163 |
164 | 168 |
169 |
170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 70% 23 | 24 | 25 | 70% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.estimoteproximitysdk 7 | CFBundleName 8 | EstimoteProximitySDK 9 | DocSetPlatformFamily 10 | estimoteproximitysdk 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

EstimoteProximitySDK Docs (70% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 80 |
81 |
82 |
83 |

Enumerations

84 |

The following enumerations are available globally.

85 | 86 |
87 |
88 |
89 |
    90 |
  • 91 |
    92 | 93 | 94 | 95 | EPXProximityObserverError 96 | 97 |
    98 |
    99 |
    100 |
    101 |
    102 |
    103 |

    Possible errors invoked with Proximity Observer’s error block.

    104 | 105 | See more 106 |
    107 |
    108 |

    Declaration

    109 |
    110 |

    Objective-C

    111 |
    enum EPXProximityObserverError {}
    112 | 113 |
    114 |
    115 |

    Swift

    116 |
    enum EPXProximityObserverError : UInt
    117 | 118 |
    119 |
    120 |
    121 |
    122 |
  • 123 |
124 |
125 |
126 |
    127 |
  • 128 |
    129 | 130 | 131 | 132 | EPXLogLevel 133 | 134 |
    135 |
    136 |
    137 |
    138 |
    139 |
    140 |

    Defines logger level.

    141 | 142 | See more 143 |
    144 |
    145 |

    Declaration

    146 |
    147 |

    Objective-C

    148 |
    enum EPXLogLevel {}
    149 | 150 |
    151 |
    152 |

    Swift

    153 |
    enum EPXLogLevel : UInt
    154 | 155 |
    156 |
    157 |
    158 |
    159 |
  • 160 |
161 |
162 |
163 |
164 | 168 |
169 |
170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EstimoteProximitySDK Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

EstimoteProximitySDK Docs (70% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 79 |
80 |
81 |
82 | 83 |

84 |

iOS-Proximity-SDK-Source

85 | 86 |

Source of Estimote Proximity SDK. It uses EstimoteBluetoothScanning as a submodule, so clone the SDK source with

87 |
git clone git@github.com:Estimote/iOS-Proximity-SDK.git --recursive
 88 | 
89 | 90 |

or execute

91 |
git submodule update --init
 92 | 
93 | 94 |

before building.

95 | 96 |

The schemes in the workspace are:

97 | 98 |
    99 |
  • EstimoteProximitySDK — the dynamic framework target with SDK code.
  • 100 |
  • EstimoteProximitySDKTests — test target with all tests (both unit and integration).
  • 101 |
  • UnitTests — scheme for EstimoteProximitySDKTests target with integration tests disabled. Because it contains unit tests only, it’s very fast to run (~1s). Use it in day-to-day development.
  • 102 |
  • IntegrationTests — scheme for EstimoteProximitySDKTests target with unit tests tests disabled. It takes more than 30s to run, as it replays long datasets.
  • 103 |
  • FatFramework — an aggregate target that runs build scripts to produce a framework that can be published. To execute them, simply select the scheme and trigger Build (cmd + B). When the scripts are executing, their intermediate artifacts are put to EstimoteProximitySDK/build. When they’re done, the built framework is present in EstimoteProximitySDK/Output-EstimoteProximitySDK-Release.
  • 104 |
  • ProximitySample — an internal app target that can be used to check how Proximity SDK works on a real device. Feel free to modify it and commit changes.
  • 105 |
106 |

Contributing

107 | 108 |
    109 |
  1. Create a new branch according to our git guidelines.
  2. 110 |
  3. Write an automated test (start with unit tests!). You don’t want to manually test your feature before each future release, trust me on this one.
  4. 111 |
  5. Implement your functionality.
  6. 112 |
  7. Create a pull request and assign somebody from iOS Guild. Also ping the reviewer on Slack.
  8. 113 |
114 |

Releasing

115 | 116 |

Refer to ReleaseProcess document

117 | 118 |
119 |
120 | 124 |
125 |
126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | function toggleItem($link, $content) { 12 | var animationDuration = 300; 13 | $link.toggleClass('token-open'); 14 | $content.slideToggle(animationDuration); 15 | } 16 | 17 | function itemLinkToContent($link) { 18 | return $link.parent().parent().next(); 19 | } 20 | 21 | // On doc load + hash-change, open any targetted item 22 | function openCurrentItemIfClosed() { 23 | if (window.jazzy.docset) { 24 | return; 25 | } 26 | var $link = $(`.token[href="${location.hash}"]`); 27 | $content = itemLinkToContent($link); 28 | if ($content.is(':hidden')) { 29 | toggleItem($link, $content); 30 | } 31 | } 32 | 33 | $(openCurrentItemIfClosed); 34 | $(window).on('hashchange', openCurrentItemIfClosed); 35 | 36 | // On item link ('token') click, toggle its discussion 37 | $('.token').on('click', function(event) { 38 | if (window.jazzy.docset) { 39 | return; 40 | } 41 | var $link = $(this); 42 | toggleItem($link, itemLinkToContent($link)); 43 | 44 | // Keeps the document from jumping to the hash. 45 | var href = $link.attr('href'); 46 | if (history.pushState) { 47 | history.pushState({}, '', href); 48 | } else { 49 | location.hash = href; 50 | } 51 | event.preventDefault(); 52 | }); 53 | 54 | // Clicks on links to the current, closed, item need to open the item 55 | $("a:not('.token')").on('click', function() { 56 | if (location == this.href) { 57 | openCurrentItemIfClosed(); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/docsets/EstimoteProximitySDK.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/EstimoteProximitySDK.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/docsets/EstimoteProximitySDK.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/docs/img/gh.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EstimoteProximitySDK Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

EstimoteProximitySDK Docs (70% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 79 |
80 |
81 |
82 | 83 |

84 |

iOS-Proximity-SDK-Source

85 | 86 |

Source of Estimote Proximity SDK. It uses EstimoteBluetoothScanning as a submodule, so clone the SDK source with

87 |
git clone git@github.com:Estimote/iOS-Proximity-SDK.git --recursive
 88 | 
89 | 90 |

or execute

91 |
git submodule update --init
 92 | 
93 | 94 |

before building.

95 | 96 |

The schemes in the workspace are:

97 | 98 |
    99 |
  • EstimoteProximitySDK — the dynamic framework target with SDK code.
  • 100 |
  • EstimoteProximitySDKTests — test target with all tests (both unit and integration).
  • 101 |
  • UnitTests — scheme for EstimoteProximitySDKTests target with integration tests disabled. Because it contains unit tests only, it’s very fast to run (~1s). Use it in day-to-day development.
  • 102 |
  • IntegrationTests — scheme for EstimoteProximitySDKTests target with unit tests tests disabled. It takes more than 30s to run, as it replays long datasets.
  • 103 |
  • FatFramework — an aggregate target that runs build scripts to produce a framework that can be published. To execute them, simply select the scheme and trigger Build (cmd + B). When the scripts are executing, their intermediate artifacts are put to EstimoteProximitySDK/build. When they’re done, the built framework is present in EstimoteProximitySDK/Output-EstimoteProximitySDK-Release.
  • 104 |
  • ProximitySample — an internal app target that can be used to check how Proximity SDK works on a real device. Feel free to modify it and commit changes.
  • 105 |
106 |

Contributing

107 | 108 |
    109 |
  1. Create a new branch according to our git guidelines.
  2. 110 |
  3. Write an automated test (start with unit tests!). You don’t want to manually test your feature before each future release, trust me on this one.
  4. 111 |
  5. Implement your functionality.
  6. 112 |
  7. Create a pull request and assign somebody from iOS Guild. Also ping the reviewer on Slack.
  8. 113 |
114 |

Releasing

115 | 116 |

Refer to ReleaseProcess document

117 | 118 |
119 |
120 | 124 |
125 |
126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | function toggleItem($link, $content) { 12 | var animationDuration = 300; 13 | $link.toggleClass('token-open'); 14 | $content.slideToggle(animationDuration); 15 | } 16 | 17 | function itemLinkToContent($link) { 18 | return $link.parent().parent().next(); 19 | } 20 | 21 | // On doc load + hash-change, open any targetted item 22 | function openCurrentItemIfClosed() { 23 | if (window.jazzy.docset) { 24 | return; 25 | } 26 | var $link = $(`.token[href="${location.hash}"]`); 27 | $content = itemLinkToContent($link); 28 | if ($content.is(':hidden')) { 29 | toggleItem($link, $content); 30 | } 31 | } 32 | 33 | $(openCurrentItemIfClosed); 34 | $(window).on('hashchange', openCurrentItemIfClosed); 35 | 36 | // On item link ('token') click, toggle its discussion 37 | $('.token').on('click', function(event) { 38 | if (window.jazzy.docset) { 39 | return; 40 | } 41 | var $link = $(this); 42 | toggleItem($link, itemLinkToContent($link)); 43 | 44 | // Keeps the document from jumping to the hash. 45 | var href = $link.attr('href'); 46 | if (history.pushState) { 47 | history.pushState({}, '', href); 48 | } else { 49 | location.hash = href; 50 | } 51 | event.preventDefault(); 52 | }); 53 | 54 | // Clicks on links to the current, closed, item need to open the item 55 | $("a:not('.token')").on('click', function() { 56 | if (location == this.href) { 57 | openCurrentItemIfClosed(); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /docs/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 5 | "line": 20, 6 | "symbol": "EPXProximityObserverErrorDomain", 7 | "symbol_kind": "sourcekitten.source.lang.objc.decl.constant", 8 | "warning": "undocumented" 9 | }, 10 | { 11 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 12 | "line": 28, 13 | "symbol": "EPXProximityObserverError.EPXProximityObserverErrorUnknown", 14 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 15 | "warning": "undocumented" 16 | }, 17 | { 18 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 19 | "line": 31, 20 | "symbol": "EPXProximityObserverError.EPXProximityObserverErrorFetchingTagsFailed", 21 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 22 | "warning": "undocumented" 23 | }, 24 | { 25 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 26 | "line": 34, 27 | "symbol": "EPXProximityObserverError.EPXProximityObserverErrorFetchingAttachmentsFailed", 28 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 29 | "warning": "undocumented" 30 | }, 31 | { 32 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 33 | "line": 37, 34 | "symbol": "EPXProximityObserverError.EPXProximityObserverErrorBluetoothUnsupported", 35 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 36 | "warning": "undocumented" 37 | }, 38 | { 39 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 40 | "line": 40, 41 | "symbol": "EPXProximityObserverError.EPXProximityObserverErrorBluetoothOff", 42 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 43 | "warning": "undocumented" 44 | }, 45 | { 46 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 47 | "line": 43, 48 | "symbol": "EPXProximityObserverError.EPXProximityObserverErrorMotionDetectionFailed", 49 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 50 | "warning": "undocumented" 51 | }, 52 | { 53 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserver.h", 54 | "line": 46, 55 | "symbol": "EPXProximityObserverError.EPXProximityObserverErrorMonitoringNotPermitted", 56 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 57 | "warning": "undocumented" 58 | }, 59 | { 60 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserverConfiguration.h", 61 | "line": 21, 62 | "symbol": "EPXLogLevel.EPXLogLevelNone", 63 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 64 | "warning": "undocumented" 65 | }, 66 | { 67 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserverConfiguration.h", 68 | "line": 24, 69 | "symbol": "EPXLogLevel.EPXLogLevelError", 70 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 71 | "warning": "undocumented" 72 | }, 73 | { 74 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserverConfiguration.h", 75 | "line": 27, 76 | "symbol": "EPXLogLevel.EPXLogLevelWarning", 77 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 78 | "warning": "undocumented" 79 | }, 80 | { 81 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityObserverConfiguration.h", 82 | "line": 30, 83 | "symbol": "EPXLogLevel.EPXLogLevelInfo", 84 | "symbol_kind": "sourcekitten.source.lang.objc.decl.enumcase", 85 | "warning": "undocumented" 86 | }, 87 | { 88 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityRange.h", 89 | "line": 80, 90 | "symbol": "EPXProximityRange.-isEqualToRange:", 91 | "symbol_kind": "sourcekitten.source.lang.objc.decl.method.instance", 92 | "warning": "undocumented" 93 | }, 94 | { 95 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityRange.h", 96 | "line": 81, 97 | "symbol": "EPXProximityRange.-isEqual:", 98 | "symbol_kind": "sourcekitten.source.lang.objc.decl.method.instance", 99 | "warning": "undocumented" 100 | }, 101 | { 102 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityRange.h", 103 | "line": 82, 104 | "symbol": "EPXProximityRange.-hash", 105 | "symbol_kind": "sourcekitten.source.lang.objc.decl.method.instance", 106 | "warning": "undocumented" 107 | }, 108 | { 109 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityZoneContext.h", 110 | "line": 35, 111 | "symbol": "EPXProximityZoneContext.-init", 112 | "symbol_kind": "sourcekitten.source.lang.objc.decl.method.instance", 113 | "warning": "undocumented" 114 | }, 115 | { 116 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EPXProximityZoneContext.h", 117 | "line": 36, 118 | "symbol": "EPXProximityZoneContext.+new", 119 | "symbol_kind": "sourcekitten.source.lang.objc.decl.method.class", 120 | "warning": "undocumented" 121 | }, 122 | { 123 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EstimoteProximitySDK.h", 124 | "line": 15, 125 | "symbol": "EstimoteProximitySDKVersionNumber", 126 | "symbol_kind": "sourcekitten.source.lang.objc.decl.constant", 127 | "warning": "undocumented" 128 | }, 129 | { 130 | "file": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source/EstimoteProximitySDK/Products/EstimoteProximitySDK.framework/Headers/EstimoteProximitySDK.h", 131 | "line": 18, 132 | "symbol": "EstimoteProximitySDKVersionString", 133 | "symbol_kind": "sourcekitten.source.lang.objc.decl.constant", 134 | "warning": "undocumented" 135 | } 136 | ], 137 | "source_directory": "/Users/piotr/Code/Estimote/ios-proximity-sdk-source" 138 | } -------------------------------------------------------------------------------- /readme_images/adding_attachments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/readme_images/adding_attachments.png -------------------------------------------------------------------------------- /readme_images/assign_tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/readme_images/assign_tag.png -------------------------------------------------------------------------------- /readme_images/tag_based_sdk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/readme_images/tag_based_sdk.png -------------------------------------------------------------------------------- /tools/migration_from_ibeacon_and_tags_to_attachments/README.md: -------------------------------------------------------------------------------- 1 | # Migration script for attachments in tags and from iBeacon 2 | 3 | Script parses content of tags and converts encoded in them attachments 4 | (used in version `alpha` of Proximity SDK) to Attachments in separate section 5 | of Estimote Cloud. 6 | 7 | Additionally to ease migration from iBeacon it is able to also add attachments 8 | from iBeacon parameters (Major, Minor Proximity UUID) 9 | 10 | ## Usage 11 | 12 | To use it you need to have an account in Estimote Cloud and [create an app](https://cloud.estimote.com/#/apps/add) to obtain 13 | `APP_ID` and `APP_TOKEN` 14 | 15 | Install required python packages: 16 | 17 | `pip install -r requirements.txt` 18 | 19 | Run script: 20 | 21 | `python migration.py YOUR_APP_ID YOUR_APP_TOKEN` 22 | 23 | If you're migrating from an older Proximity SDK (and not Estimote SDK or Core Location), you can add `--no-ibeacon` to skip migrating UUID/major/minor to attachments 24 | 25 | ## Example 26 | 27 | For beacon with tag: 28 | 29 | `{"attachment":{"desk":"blueberry","venue":"office"}}` 30 | 31 | And with enabled iBeacon: 32 | 33 | ![](resources/images/iBeacon.PNG) 34 | 35 | After running script following attachments will be present: 36 | 37 | ![](resources/images/attachments.PNG) 38 | -------------------------------------------------------------------------------- /tools/migration_from_ibeacon_and_tags_to_attachments/migration.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import requests, json, base64 3 | 4 | 5 | class CloudCommunication: 6 | def __init__(self, cloud_credentials): 7 | self.server_url = cloud_credentials.server_url 8 | self.app_id = cloud_credentials.app_id 9 | self.app_token = cloud_credentials.app_token 10 | 11 | def _req_headers(self): 12 | headers = { 13 | 'accept': 'application/json', 14 | 'authorization': 'Basic ' + base64.b64encode(self.app_id + ':' + self.app_token), 15 | 'content-type': 'application/json', 16 | 'cache-control': 'no-cache', 17 | } 18 | return headers 19 | 20 | def request_all_devices(self): 21 | url = '{0}/v2/devices'.format(self.server_url) 22 | 23 | headers = self._req_headers() 24 | response = requests.request('GET', url, headers=headers) 25 | if response.status_code == 200: 26 | return json.loads(response.text) 27 | else: 28 | response.raise_for_status() 29 | 30 | def add_attachment(self, attachment, device_id): 31 | exists, existing_attachment_id, existing_attachment = self._attachment_already_exists(device_id) 32 | if exists: 33 | attachment.update(existing_attachment) 34 | self._update_attachment(existing_attachment_id, attachment, device_id) 35 | else: 36 | self._add_new_attachment(attachment, device_id) 37 | 38 | def _add_new_attachment(self, attachment, device_identifier): 39 | url = '{0}/v3/attachments'.format(self.server_url) 40 | 41 | headers = self._req_headers() 42 | content = { 43 | 'data': { 44 | 'payload': attachment, 45 | 'identifier': device_identifier, 46 | 'for': 'device' 47 | } 48 | } 49 | content = json.dumps(content) 50 | response = requests.request('POST', url, data=content, headers=headers) 51 | if response.status_code == 200: 52 | print('Successfully assigned attachments {attachment} to device {identifier}' 53 | .format(attachment=attachment, identifier=device_identifier)) 54 | else: 55 | response.raise_for_status() 56 | 57 | def _attachment_already_exists(self, identifier): 58 | url = '{0}/v3/attachments'.format(self.server_url) 59 | 60 | headers = self._req_headers() 61 | params = { 62 | 'identifiers': identifier 63 | } 64 | response = requests.request('GET', url, params=params, headers=headers) 65 | if response.status_code == 200: 66 | existing_attachments = response.json()['data'] 67 | if len(existing_attachments) > 0: 68 | return True, existing_attachments[0]['id'], existing_attachments[0]['payload'] 69 | else: 70 | return False, None, None 71 | else: 72 | response.raise_for_status() 73 | 74 | def _update_attachment(self, existing_attachment_id, attachment, device_identifier): 75 | url = '{0}/v3/attachments/{1}'.format(self.server_url, existing_attachment_id) 76 | 77 | headers = self._req_headers() 78 | content = { 79 | 'data': { 80 | 'payload': attachment, 81 | } 82 | } 83 | content = json.dumps(content) 84 | response = requests.request('PATCH', url, data=content, headers=headers) 85 | if response.status_code == 200: 86 | print('Successfully assigned attachments {attachment} to device {identifier}' 87 | .format(attachment=attachment, identifier=device_identifier)) 88 | else: 89 | response.raise_for_status() 90 | 91 | 92 | def main(): 93 | parser = argparse.ArgumentParser(description='Migrates attachment either from tags or iBeacon') 94 | parser.add_argument('app_id', help='your app id from cloud') 95 | parser.add_argument('app_token', help='your app token from cloud') 96 | parser.add_argument('--server_url', default='https://cloud.estimote.com', 97 | help='url to Estimote Cloud') 98 | parser.add_argument('--no-ibeacon', action='store_true', 99 | help='don\'t migrate iBeacon UUID/major/minor to attachments') 100 | 101 | args = parser.parse_args() 102 | estimote_cloud = CloudCommunication(args) 103 | print("Disabled iBeacon import = {0}".format(args.no_ibeacon)) 104 | include_ibeacon = not args.no_ibeacon 105 | 106 | devices = estimote_cloud.request_all_devices() 107 | for device in devices: 108 | for tag in device['shadow']['tags']: 109 | if 'attachment' in tag: 110 | attachment = json.loads(tag)['attachment'] 111 | estimote_cloud.add_attachment(attachment, device['identifier']) 112 | 113 | if include_ibeacon: 114 | ibeacon_settings = device['settings']['advertisers']['ibeacon'][0] 115 | if ibeacon_settings['enabled']: 116 | major = str(ibeacon_settings['major']) 117 | minor = str(ibeacon_settings['minor']) 118 | uuid = ibeacon_settings['uuid'] 119 | attachment = { 120 | 'uuid': uuid, 121 | 'uuid:major': ':'.join([uuid, major]), 122 | 'uuid:major:minor': ':'.join([uuid, major, minor]), 123 | 124 | } 125 | estimote_cloud.add_attachment(attachment, device['identifier']) 126 | 127 | 128 | if __name__ == '__main__': 129 | main() 130 | -------------------------------------------------------------------------------- /tools/migration_from_ibeacon_and_tags_to_attachments/requirements.txt: -------------------------------------------------------------------------------- 1 | requests -------------------------------------------------------------------------------- /tools/migration_from_ibeacon_and_tags_to_attachments/resources/images/attachments.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/tools/migration_from_ibeacon_and_tags_to_attachments/resources/images/attachments.PNG -------------------------------------------------------------------------------- /tools/migration_from_ibeacon_and_tags_to_attachments/resources/images/iBeacon.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Estimote/iOS-Proximity-SDK/98f01cab3e902569036ca2c732fa5b3112a8d9db/tools/migration_from_ibeacon_and_tags_to_attachments/resources/images/iBeacon.PNG --------------------------------------------------------------------------------