diff --git a/StroeerProxity.framework/Headers b/StroeerProxity.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/StroeerProxity.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/StroeerProxity.framework/Resources b/StroeerProxity.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/StroeerProxity.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/StroeerProxity.framework/StroeerProxity b/StroeerProxity.framework/StroeerProxity new file mode 120000 index 0000000..6cfef4e --- /dev/null +++ b/StroeerProxity.framework/StroeerProxity @@ -0,0 +1 @@ +Versions/Current/StroeerProxity \ No newline at end of file diff --git a/StroeerProxity.framework/Versions/A/Headers/SPXActionActivity.h b/StroeerProxity.framework/Versions/A/Headers/SPXActionActivity.h new file mode 100644 index 0000000..81126b5 --- /dev/null +++ b/StroeerProxity.framework/Versions/A/Headers/SPXActionActivity.h @@ -0,0 +1,10 @@ +// +// SPXActionActivity.h +// +// Copyright (c) 2015 match2blue GmbH. All rights reserved. +// + +typedef NS_ENUM(int, SPXActionActivity) { + SPXActionActivityLeaving = 0, + SPXActionActivityEntering +}; diff --git a/StroeerProxity.framework/Versions/A/Headers/SPXBeacon.h b/StroeerProxity.framework/Versions/A/Headers/SPXBeacon.h new file mode 100644 index 0000000..2d90313 --- /dev/null +++ b/StroeerProxity.framework/Versions/A/Headers/SPXBeacon.h @@ -0,0 +1,55 @@ +// +// SPXBeacon.h +// +// Copyright (c) 2015 match2blue GmbH. All rights reserved. +// + +#import + + +/** + * Class that represents a beacon. + */ +@interface SPXBeacon : NSObject + +/** + * The name / identifier of the beacon. + */ +@property (nonatomic, readonly, nonnull) NSString* name; + +/** + * The UUID of the beacon. + */ +@property (nonatomic, readonly, nonnull) NSString* uuid; + +/** + * The major value of the beacon. + */ +@property (nonatomic, readonly) NSInteger major; + +/** + * The minor value of the beacon. + */ +@property (nonatomic, readonly) NSInteger minor; + + + +/** + * The latitiude of the beacon. + */ +@property (nonatomic, readonly) double latitude; + +/** + * The longitude of the beacon. + */ +@property (nonatomic, readonly) double longitude; + + +/** + * Helper method which returns the current content of the instance as dictionary. + * + * @return Returns a dictionary whose keys matches the property names. + */ +- (nonnull NSDictionary*)toDictionary; + +@end diff --git a/StroeerProxity.framework/Versions/A/Headers/SPXCustomAnalyticsType.h b/StroeerProxity.framework/Versions/A/Headers/SPXCustomAnalyticsType.h new file mode 100644 index 0000000..0b6be2a --- /dev/null +++ b/StroeerProxity.framework/Versions/A/Headers/SPXCustomAnalyticsType.h @@ -0,0 +1,26 @@ +// +// SPXCustomAnalyticsType.h +// +// Copyright © 2015 match2blue. All rights reserved. +// + +#import + +/** + * This class represents a custom analytics type created in the dashboard. + * Use instances of this class to send custom analytics events to the database. + */ +@interface SPXCustomAnalyticsType : NSObject + +/** + * Name of the custom analytics type. + */ +@property (nonatomic, readonly) NSString *name; + +/** + * Type-ID of the custom analytics type. + */ +@property (nonatomic, readonly) NSString *type; + + +@end diff --git a/StroeerProxity.framework/Versions/A/Headers/SPXDeviceAction.h b/StroeerProxity.framework/Versions/A/Headers/SPXDeviceAction.h new file mode 100644 index 0000000..b09e2fa --- /dev/null +++ b/StroeerProxity.framework/Versions/A/Headers/SPXDeviceAction.h @@ -0,0 +1,65 @@ +// +// SPXDeviceAction.h +// +// Copyright (c) 2015 match2blue GmbH. All rights reserved. +// + +@class SPXBeacon; + +#import "SPXActionActivity.h" + +typedef NS_ENUM(int, SPXActionProximityTrigger) { + SPXActionProximityTriggerImmediate = 0, + SPXActionProximityTriggerNear, + SPXActionProximityTriggerFar +}; + +/** + * This class represents an action that should show a local push notificaiton. + */ +@interface SPXDeviceAction : NSObject + +/** + * The name of the action. + */ +@property (nonatomic, readonly) NSString *name; + +/** + * The plain description of the action. + */ +@property (nonatomic, readonly) NSString *plainDescription; + +/** + * The data of the action. + */ +@property (nonatomic, readonly) NSDictionary *data; + +/** + * The type of the action. + */ +@property (nonatomic, readonly) NSString *type; + +/** + * The activity of the action. + */ +@property (nonatomic, readonly) SPXActionActivity actionActivity; + +/** + * The linked bluloc that triggered this action. + */ +@property (nonatomic, readonly) SPXBeacon *bluloc; + +/** + * The proximity trigger for this action set in the dashboard. + * Can be either immediate, near or far. + */ +@property (nonatomic, readonly) SPXActionProximityTrigger proximityTrigger; + +/** + * Helper method which returns the current content of the instance as dictionary. + * + * @return Returns a dictionary whose keys matches the property names. + */ +- (NSDictionary*)toDictionary; + +@end diff --git a/StroeerProxity.framework/Versions/A/Headers/SPXLocation.h b/StroeerProxity.framework/Versions/A/Headers/SPXLocation.h new file mode 100644 index 0000000..faa6d08 --- /dev/null +++ b/StroeerProxity.framework/Versions/A/Headers/SPXLocation.h @@ -0,0 +1,98 @@ +// +// SPXLocation.h +// +// Copyright © 2015 match2blue. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +static CLLocationAccuracy const SPXUnknownLocationAccuracy = -1; + +/** + * This class represents a outdoor location. + */ +@interface SPXLocation : NSObject + +/** + * The Latitude of the location. + */ +@property (nonatomic) CLLocationDegrees latitude; + +/** + * The longitude of the location. + */ +@property (nonatomic) CLLocationDegrees longitude; + +/** + * The current estimated accuracy of the position in metres. + * Can be used to draw an accuracy circle around the user position on the map. + */ +@property (nonatomic) CLLocationAccuracy accuracy; + +/** + * The timestamp when the location was calculated. + */ +@property (nonatomic) NSDate *timestamp; + +/** + * Method to create a new outdoor location. + * + * @param coordinate Coordinate of the location + * + * @return A new @p SPXLocation object initialzed with the given values and a accuracy of @p SPXUnknownLocationAccuracy. + */ ++ (SPXLocation*)locationWithCoordinate:(CLLocationCoordinate2D)coordinate; + +/** + * Method to create a new outdoor location. + * + * @param lat Latitude of the location + * @param lng Longitude of the location + * + * @return A new @p SPXLocation object initialzed with the given values and a accuracy of @p SPXUnknownLocationAccuracy. + */ ++ (SPXLocation*)locationWithLatitude:(CLLocationDegrees)lat longitude:(CLLocationDegrees)lng; + +/** + * Method to create a new outdoor location. + * + * @param lat Latitude of the location + * @param lng Longitude of the location + * @param accuracy The estimated accuracy of the location. + * + * @return A new @p SPXLocation object initialzed with the given values. + */ ++ (SPXLocation*)locationWithLatitude:(CLLocationDegrees)lat longitude:(CLLocationDegrees)lng accuracy:(CLLocationAccuracy)accuracy; + +/** + * Helper method to get the CLLocationCoordinate2D representation of latitude and longitude of the location. + * + * @return The coordinates of the location. + */ +- (CLLocationCoordinate2D)coordinate; + +/** + * Calculates the distance between two locations. + * + * @param location another location + * + * @return Returns the distance between two locations. + */ +- (CLLocationDistance)distanceFromLocation:(SPXLocation*)location; + +/** + * Calculates the distance between a SPXLocation and a CLLocation instance. + * The floor won't be taken into account. + * + * @param location A CLLocation instance. + * + * @return Returns the distance between two locations. + */ +- (CLLocationDistance)distanceFromCLLocation:(CLLocation*)location; + +NS_ASSUME_NONNULL_END + +@end diff --git a/StroeerProxity.framework/Versions/A/Headers/SPXStroeerProxityAPI.h b/StroeerProxity.framework/Versions/A/Headers/SPXStroeerProxityAPI.h new file mode 100644 index 0000000..384cb5e --- /dev/null +++ b/StroeerProxity.framework/Versions/A/Headers/SPXStroeerProxityAPI.h @@ -0,0 +1,529 @@ +// +// SPXStroeerProxityAPI.h +// +// Copyright (c) 2015 match2blue GmbH. All rights reserved. +// + +#import +#import +#import + +@class SPXBeacon; +@class SPXCustomAnalyticsType; +@class SPXDeviceAction; +@class SPXLocation; + +@protocol SPXStroeerProxityAPIDelegate; + +NS_ASSUME_NONNULL_BEGIN + +/** + * Possible errors that can occure in the SDK + */ +typedef NS_ENUM(NSInteger, SPXError) +{ + /** + * An unknown error occured. + */ + SPXErrorUnknown = 0, + + /** + * The specified app key or sphere isn't valid. + */ + SPXErrorInvalidAppKeyOrSphere, + + /** + * The specified app key is deactivated. + */ + SPXErrorInactiveAppKey, + + /** + * The app key and sphere couldn't be validated or the operation couldn't be finished due to network errors. + */ + SPXErrorNetworkConnection, + + /** + * This error is thrown during the setup if the device doesn't support ranging for beacons. + */ + SPXErrorBeaconRangingNotSupported, +}; + +/** + * Possible states in which the controller can be. Depending on the state scanning for beacons is possible or not. + */ +typedef NS_ENUM(NSInteger, SPXState) +{ + /** + * @p SPXStroeerProxityAPI hasn't been setup yet. In this state scanning isn't possible. + */ + SPXStateNone = 0, + + /** + * Setup of the @p SPXStroeerProxityAPI was successful but the data isn't up to date. In this state scanning is possible. + */ + SPXStateOffline, + + /** + * Setup of the @p SPXStroeerProxityAPI was successful and the data is up to date . In this state scanning is possible. + */ + SPXStateOnline +}; + +/** + * Enum to specify the download strategy. + */ +typedef NS_ENUM(NSInteger, SPXDownloadStrategy) +{ + /** + * Download all content (beacons, actions, ...). + */ + SPXDownloadStrategyAll = 0, + + /** + * Download only content (beacons, actions, ...) which is in your vicinity. + */ + SPXDownloadStrategyAroundMe +}; + + +#pragma mark - SPXStroeerProxityAPI + + +/** + * Main class of the SDK with handles the authentication and scanning for nearby beacons. + */ +@interface SPXStroeerProxityAPI : NSObject + +/** + * Delegate that informs about triggered actions. + */ +@property (nonatomic) id delegate; + +/** + @brief Defines how the content should be downloaded. + You can choose between two strategies: SPXDownloadStrategyAll and SPXDownloadStrategyAroundMe. + + @discussion The SPXDownloadStrategyAll strategy is the default approach which will download all relevant data from the server. + This strategy is recommended if you have only a small amount of beacons and actions. + + The SPXDownloadStrategyAroundMe strategy should be used if you have a lot of beacons and actions. + With this approach every beacon and all associated actions will be + downloaded in a certain radius (1 km) around the current user location. + Region Monitoring is used to determine the location of the user. + + @remark For proper function of the SPXDownloadStrategyAroundMe strategy you have to + + - set a position for every beacon. + + - enable the background capability "Location updates" for your app. + + - add the NSLocationAlwaysUsageDescription key to the info.plist file with a suitable value (iOS 8+). + + - add the NSLocationUsageDescription key to the info.plist file with a suitable value (iOS 7). + + Default value: SPXDownloadStrategyAll. + + @remark Has to be called before on of the @c - @c(void)setupWithAppKey:andSphere:... methods. + */ +@property (nonatomic) SPXDownloadStrategy downloadStrategy; + +/** + * Returns the current state of the @p SPXStroeerProxityAPI. The state will be updated during the setup process or in the @p updateContentFromServer method. Default value is @p SPXStateNone + */ +@property (nonatomic, readonly) SPXState state; + +/** + * Contains the current state of the bluetooth hardware. + * This property will only be updated if the target isn't the iphone simulator (@p TARGET_IPHONE_SIMULATOR not defined). + */ +@property (nonatomic, readonly) CBCentralManagerState bluetoothState; + +/** + * The user token is a 128-bit UUID generated during the first successful SDK setup. + * With this token it's possible to restore user specific sdk information (e.g. capping) after a fresh install of the app on the same device or another. + * + * Once generated the user token will be re-used until the cache was cleared, you specified another user token or the app was deleted. + * + * @note Simultaneous use of the same user token on different devices may lead to information loss. + */ +@property (nonatomic, readonly) NSString *userToken; + +/** + * Returns the singleton instance of the @p SPXStroeerProxityAPI class. Use this method instead of @p init or @p new. + * + * @return A @p SPXStroeerProxityAPI singleton instance. + */ ++ (instancetype)sharedInstance; + +/** + * Returns the current SDK-Version + * + * @return Current version of the SDK. + */ ++ (NSString *)sdkVersion; + + +#pragma mark - SDK Setup + + +/** + * Method to setup the @p SPXStroeerProxityAPI with multiple proximityUUIDs. It is necessary to call this method before starting the scanning process. + * The method returns immediately because the given @p appKey and @p sphere will be checked asynchronously. + * + * On the first successful call this method will generate a new user token. After this the generated user token will be reused. + * + * @note The @p successBlock will be called if + * - the setup was successful and data could read from the server. The @p state will be updated to @p SPXStateOnline. + * - internet connection isn't available but the setup process and content update was successful previously. + * The @p state will be updated to @p SPXStateOffline. After the internet connection is back the @p SPXStroeerProxityAPI will try updating the data automatically. + * If this succeeds the @p state will be updated to @p SPXStateOnline. + * + * @note The @p errorBlock will be called if + * - an unexpected error occurred during the setup or content loading (e.g. invalid app key or sphere). The @p state will be updated to @p SPXStateNone. + * - there wasn't a successful setup yet and a internet connection isn't available. The @p state will be updated to @p SPXStateNone. + * + * @param appKey A key to verify your app to use this framework. + * @param sphere A specific value defined for the current client. + * @param proximityUUIDs The UUIDs of your beacons. + * @param successBlock Will be called if the @p state was updated to @p SPXStateOffline or @p SPXStateOnline. + * @param errorBlock Will be called if the @p state was updated to @p SPXStateNone. + */ +- (void)setupWithAppKey:(NSString*)appKey + andSphere:(NSString*)sphere + proximityUUIDs:(NSArray*)proximityUUIDs + successBlock:(nullable void (^)(NSString *userToken))successBlock + errorBlock:(nullable void (^)(SPXError error, NSString *errorMessage))errorBlock; + +/** + * Method to setup the @p SPXStroeerProxityAPI with multiple proximityUUIDs. It is necessary to call this method before starting the scanning process. + * The method returns immediately because the given @p appKey and @p sphere will be checked asynchronously. + * + * This method won't generate a new user token. The SDK will try to validate the specified user token. If this token is invalid the setup fails. + * + * @note The @p successBlock will be called if + * - the setup was successful and data could read from the server. The @p state will be updated to @p SPXStateOnline. + * - internet connection isn't available but the setup process and content update was successful previously. + * The @p state will be updated to @p SPXStateOffline. After the internet connection is back the @p SPXStroeerProxityAPI will try updating the data automatically. + * If this succeeds the @p state will be updated to @p SPXStateOnline. + * + * @note The @p errorBlock will be called if + * - an unexpected error occurred during the setup or content loading (e.g. invalid app key or sphere). The @p state will be updated to @p SPXStateNone. + * - there wasn't a successful setup yet and a internet connection isn't available. The @p state will be updated to @p SPXStateNone. + * + * @param appKey A key to verify your app to use this framework. + * @param sphere A specific value defined for the current client. + * @param proximityUUIDs The UUIDs of your beacons. + * @param userToken With this user token it's possible to login an existing device user on another device or the same device after the app was re-installed. + * @param successBlock Will be called if the @p state was updated to @p SPXStateOffline or @p SPXStateOnline. + * @param errorBlock Will be called if the @p state was updated to @p SPXStateNone. + */ +- (void)setupWithAppKey:(NSString*)appKey + andSphere:(NSString*)sphere + proximityUUIDs:(NSArray*)proximityUUIDs + userToken:(nullable NSString*)userToken + successBlock:(nullable void (^)(NSString *userToken))successBlock + errorBlock:(nullable void (^)(SPXError error, NSString *errorMessage))errorBlock; + + +#pragma mark - Scanning + + +/** + * Defines the time in seconds that is used to collect beacon data before analysing them. + * Default value are 5 seconds and the minimum scan period amounts to two seconds. + * The custom scan period has to be set before start scanning with the @p startScan method. + */ +@property (nonatomic) CGFloat scanPeriod; + +/** + * This method downloads the latest data asynchon from the server and starts scanning for nearby beacons until @p stopScan was called. + * To setup a custom scan period the property @p scanPeriod can be used. + * + * @b Background-Scanning + * + * To enable scanning in background it is necessary to enable the background capability "Location updates" for your app. + * For iOS 8 you have also to add the @p NSLocationAlwaysUsageDescription key to the @p info.plist file with a suitable value. + * + * If the app is running in background, scanning is active and the device comes in the vicinity of one of your beacons a @p UILocalNotification will be shown on devices running iOS 7. + * This @p UILocalNotification is used to encourage the user to open the app and background scanning can be activated. + * For devices running iOS 8 or higher background scanning will just activated without such a @p UILocalNotification. + * + * @b Hint: + * + * To scan nearby beacons it's necessary that the @p state is @p SPXStateOffline or @p SPXStateOnline. The state can be updated with this method: + * @code + - (void)setupWithAppKey:(NSString*)appKey + andSphere:(NSString*)sphere + proximityUUIDs:(NSArray*)proximityUUIDs + successBlock:(void (^)())successBlock + errorBlock:(void (^)(SPXError error, NSString *errorMessage))errorBlock; + * @endcode + * + * @return @p NO if the @p state is @p SPXStateNone. + */ +- (BOOL)startScan; + +/** + * Stops the current scanning process. + */ +- (void)stopScan; + +/** + * Indicates whether the SDK is currently scanning for nearby beacons. + */ +- (BOOL)isScanning; + + +#pragma mark - Background Scanning + + +/** + * If the app is running in background, scanning is active and the device comes in the vicinity of one of your beacons a @p UILocalNotification will be shown on devices running iOS 7. + * This @p UILocalNotification is used to encourage the user to open the app and background scanning can be activated. + * For devices running iOS 8 or higher backround scanning will just activated without such a @p UILocalNotification. + * + * With this property the value of the @p UILocalNotification alert body can be adjusted. + * Default value is "Open the app to enable background mode". + * + * @note This property isn't used on devices running iOS 8 or higher. + */ +@property (nonatomic, nullable) NSString *backgroundScanningNotificationBody; + +/** + * If the app is running in background, scanning is active and the device comes in the vicinity of one of your beacons a @p UILocalNotification will be shown on devices running iOS 7. + * This @p UILocalNotification is used to encourage the user to open the app and background scanning can be activated. + * For devices running iOS 8 or higher backround scanning will just activated without such a @p UILocalNotification. + * + * With this property the sound of the @p UILocalNotification can be adjusted. + * If not set the default system sound will be used. + * + * @note This property isn't used on devices running iOS 8 or higher. + * + * @see The @p soundName property of the @p UILocalNotification class for further information. + */ +@property (nonatomic, nullable) NSString *backgroundScanningNotificationSoundName; + +/** + * If the app is running in background, scanning is active and the device comes in the vicinity of one of your beacons a @p UILocalNotification will be shown on devices running iOS 7. + * This @p UILocalNotification is used to encourage the user to open the app and background scanning can be activated. + * For devices running iOS 8 or higher background scanning will just activated without such a @p UILocalNotification. + * + * With this property the value of the @p UILocalNotification alert action can be adjusted. + * Default value is "Open". + * + * @note This property isn't used on devices running iOS 8 or higher. + */ +@property (nonatomic, nullable) NSString *backgroundScanningNotificationAction; + +/** + * If the app is running in background, scanning is active and the device comes in the vicinity of one of your beacons a @p UILocalNotification will be shown on devices running iOS 7. + * This @p UILocalNotification is used to encourage the user to open the app and background scanning can be activated. + * For devices running iOS 8 or higher background scanning will just activated without such a @p UILocalNotification. + * + * Background scanning will be deactivated after this amount of time in seconds if no own beacon was scanned. + * Default value are 600 seconds (10 minutes). + * + * @note This property isn't used on devices running iOS 8 or higher. + */ +@property (nonatomic) NSTimeInterval backgroundScanningInactiveInterval; + +/** + * This method checks if the device supports beacon region monitoring and background scanning can be used. + * + * @return @p Yes, if background scanning is supported. + */ ++ (BOOL)backgroundScanningSupportedByDevice; + + +#pragma mark - Data Management + + +/** + * This method removes all cached data from the device. + * Furthermore it resets the connection to the server and stops the scanning process if started yet. + * The @p state will be updated to @p SPXStateNone. + */ +- (void)clearCachedData; + +/** + * This method resets all properties to their default values. + * Furthermore it resets the connection to the server and stops the scanning process if started yet. + * The @p state will be updated to @p SPXStateNone. + */ +- (void)resetToDefaultValues; + +/** + * Method to force updating the data from the server on the device. + * + * @b Hint: + * + * To force updates it's necessary that the @p state is @p SPXStateOnline. The state can be updated with this method: + * @code + - (void)setupWithAppKey:(NSString*)appKey + andSphere:(NSString*)sphere + proximityUUIDs:(NSArray*)proximityUUIDs + successBlock:(void (^)())successBlock + errorBlock:(void (^)(SPXError error, NSString *errorMessage))errorBlock; + * @endcode + * + * @param successBlock Will be called if the content update was successful. + * @param errorBlock Will be called if the content update wasn't successful. + * + * @return @p NO if the @p state isn't @p SPXStateOnline. + */ +- (BOOL)updateContentFromServerWithSuccessBlock:(nullable void (^)())successBlock + errorBlock:(nullable void (^)(SPXError error, NSString *errorMessage))errorBlock; + + +#pragma mark - Analytics + + +/** + * With this property the creation of new analytics events can be prevented. + * Any unsent events will also be deleted. As default analytics is enabled. + */ +@property (nonatomic, getter=isAnalyticsEnabeld) BOOL analyticsEnabled; + +/** + * With this method the action will be confirmed on the server. + * Call this after e.g. the user pressed on the push notification. + * + * @note This method will be removed soon. Please use this method instead: + * @code + - (void)sendConfirmAnalyticsEventWithAction:(SPXDeviceAction*)action; + * @endcode + * + * @param action The action that has to be confirmed. + */ +- (void)analyticsConfirmAction:(SPXDeviceAction*)action __attribute__((deprecated(("Use the sendConfirmAnalyticsEventWithAction: method instead.")))); + +/** + * With this method the action will be confirmed on the server. + * Call this method after e.g. the user pressed on the push notification. + * + * @param action The action which shall be confirmed. + * + * @return If the action has a capping and the maximum number is reached, @p NO will be returned, otherwise @p YES. + */ +- (BOOL)sendConfirmAnalyticsEventWithAction:(SPXDeviceAction*)action; + + +#pragma mark - Custom Analytics Events + + +/** + * Returns all in the dashboard created custom analytics event types. + * Use one of these objects to call the sendCustomAnalyticsEventWithAction:andType: method. + * + * @return A list of SPXCustomAnalyticsType objects. + */ +- (NSArray *)customAnalyticsEventTypes; + +/** + * This method creates an analytics event on the server for a custom analytics type. + * Call this method after e.g. the user pressed a like button. + * + * @param action The action for which an event shall be created. + * @param type A custom event type which is defined in the dashboard. + */ +- (void)sendCustomAnalyticsEventWithAction:(SPXDeviceAction*)action andType:(SPXCustomAnalyticsType*)type; + + +#pragma mark - Free Analytics Events + + +/** + * This method allows you to send whatever type of analytics event with a custom amount of payload. + * Such events won't be appear in the dashboard. The payload must not be empty. + * + * @param payload Customizable payload. + */ +- (void)sendFreeAnalyticsEventWithPayload:(NSDictionary*)payload; + + +/** + * Set to @p YES to enable the sliding window approach for positioning. + * + * @note The default value is @p NO. + */ +@property (nonatomic, getter=isSlidingWindowEnabled) BOOL slidingWindowEnabled; +#pragma mark - Outdoor Positioning + +/** + * If you also want to retrieve outdoor position updates (GPS) set this property to @p YES. + * To receive location updates you have to implement this method of the @p SPXStroeerProxityAPIDelegate: + * @code + - (void)locationUpdated:(nullable SPXLocation *)location; + * @endcode + * + * @note The @p state of SDK must be either @p SPXStateOffline or @p SPXStateOnline. The state can be updated with this method: + * @code + - (void)setupWithAppKey:(NSString*)appKey + andSphere:(NSString*)sphere + proximityUUIDs:(NSArray*)proximityUUIDs + successBlock:(void (^)())successBlock + errorBlock:(void (^)(SPXError error, NSString *errorMessage))errorBlock; + * @endcode + */ +@property (nonatomic, getter=isOutdoorPositioningEnabled) BOOL outdoorPositioningEnabled; + +/** + * Specify the desired outoor location accuracy. + * Default value: @p kCLLocationAccuracyBest + */ +@property (nonatomic) CLLocationAccuracy outdoorPositioningAccuracy; + +@end + + +#pragma mark - SPXStroeerProxityAPIDelegate + + +/** + * Protocol that informs about scanned beacons. + */ +@protocol SPXStroeerProxityAPIDelegate + +@optional + +/** + * A nearby beacon was scanned and triggered the given action. + * + * @param action The action that is linked with the scanned beacon. + */ +- (void)actionReceived:(SPXDeviceAction*)action; + +/** + * This method informs about state changes of the bluetooth hardware. + * To check if bluetooth is either enabled or not the @p bluetoothEnabled property can be used. + * This method will only be called if the target isn't the iphone simulator (@p TARGET_IPHONE_SIMULATOR not defined). + */ +- (void)bluetoothStateChangedFromState:(CBCentralManagerState)oldState toState:(CBCentralManagerState)newState; + +/** + * This method will be called after the authorization status has changed to @p kCLAuthorizationStatusDenied or @p kCLAuthorizationStatusRestricted. + * This happens when the user doesn't allow the usage of location services. The SDK will stop scanning. + */ +- (void)usageOfLocationServicesIsDenied; + +/** + * Whenever a a new outdoor location was calculated this method will be triggered. + * A outdoor location will only be sent if @p outdoorPositioningEnabled is @p YES. + * + * @param location The new location. + */ +- (void)locationUpdated:(nullable SPXLocation *)location; + +/** + * Informs the delegate that beacons were ranged during the last scan interval. + */ +- (void)didRangeBeacons; + +/** + * Will be called after the latest data where downloaded from the server. + */ +- (void)contentUpdated; + +@end + +NS_ASSUME_NONNULL_END diff --git a/StroeerProxity.framework/Versions/A/Headers/StroeerProxity.h b/StroeerProxity.framework/Versions/A/Headers/StroeerProxity.h new file mode 100644 index 0000000..5267a56 --- /dev/null +++ b/StroeerProxity.framework/Versions/A/Headers/StroeerProxity.h @@ -0,0 +1,16 @@ +// +// StroeerProxity.h +// +// Copyright (c) 2015 match2blue GmbH. All rights reserved. +// + +#ifndef StroeerProxity_h +#define StroeerProxity_h + +#import +#import +#import +#import +#import + +#endif diff --git a/StroeerProxity.framework/Versions/A/StroeerProxity b/StroeerProxity.framework/Versions/A/StroeerProxity new file mode 100644 index 0000000..4d7705c Binary files /dev/null and b/StroeerProxity.framework/Versions/A/StroeerProxity differ diff --git a/StroeerProxity.framework/Versions/Current b/StroeerProxity.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/StroeerProxity.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file