diff --git a/CHANGELOG.md b/CHANGELOG.md index f80f1b0..75b7b9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.1.0 (February, 3, 2016) +- `EILIndoorLocationManager` can provide position update in two different modes. In addition to normal mode, light mode delivers stable, but a bit less responsive position updates. Has a very low system resource usage. +- In `EILLocationBuilder` beacons can be placed at arbitrary positions. +- Added request for modifying locations in Estimote Cloud. +- Updated resources with all resolutions. + ## 2.0.1 (November, 16, 2015) - Fixed a bug with EILIndoorLocationManager not starting at all, if it was started while the application was in Inactive state. diff --git a/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationManager.h b/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationManager.h index 7b5fca0..9809312 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationManager.h +++ b/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationManager.h @@ -2,6 +2,26 @@ #import +/** + * The possible modes of EILIndoorLocationManager position updates delivery. + * + * Modes differ in accuracy, stability and responsiveness. Depending on the mode system resource usage may be different. + */ +typedef NS_ENUM(NSInteger, EILIndoorLocationManagerMode) { + /** + * Normal mode of `EILIndoorLocationManager`. Delivers most accurate and responsive position updates at the cost of high system resource usage. + * + * This is the default mode of `EILIndoorLocationManager`. + * + * To achieve best results user should hold phone in hand in portrait orientation. + */ + EILIndoorLocationManagerModeNormal, + /** + * Light mode of `EILIndoorLocationManager`. Delivers stable, but a bit less responsive position updates. Has a very low system resource usage. + */ + EILIndoorLocationManagerModeLight, +}; + /** * The possible states of the monitored location. */ @@ -32,6 +52,8 @@ typedef NS_ENUM(NSInteger, EILIndoorErrorCode) { EILBluetoothNotSupportedError }; +NS_ASSUME_NONNULL_BEGIN + /** * Describes the accuracy of the determined position. * Accuracy can be represented as a circle of given radius within which the real position is expected to be. @@ -69,6 +91,11 @@ typedef NS_ENUM(NSInteger, EILPositionAccuracy) * Accuracy should be thought of as comparable to location size. */ EILPositionAccuracyVeryLow = 4, + + /** + * Accuracy of determined position is unknown. + */ + EILPositionAccuracyUnknown = 5 }; @class EILIndoorLocationManager; @@ -111,7 +138,7 @@ didFailToUpdatePositionWithError:(NSError *)error; /** * The delegate object to receive position update events. */ -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak, nullable) id delegate; /** * Starts `Indoor Location Manager`. @@ -166,7 +193,7 @@ didFailToUpdatePositionWithError:(NSError *)error; /** * The set of all monitored `Indoor Location`s. */ -@property (nonatomic, strong, readonly) NSSet *monitoredLocations; +@property (nonatomic, strong, readonly) NSSet *monitoredLocations; /** * Determines state for the monitored location. @@ -195,6 +222,24 @@ didFailToUpdatePositionWithError:(NSError *)error; /// @name Indoor Location Position Updates ///-------------------------------------------------------------------- +/** + * Mode of `EILIndoorLocationManager` position updates delivery. + * + * Default mode of `EILIndoorLocationManager` is `EILIndoorLocationManagerModeNormal`. + * + * Switching mode while delivery of position updates is in progress will effectively restart position updates with new mode. + * + * @see EILIndoorLocationManagerMode + */ +@property (nonatomic, assign) EILIndoorLocationManagerMode mode; + +/** + * Supported modes (`EILIndoorLocationManagerMode`) for the device. + * + * @return An array of supported modes (`EILIndoorLocationManagerMode`) encoded as `NSNumber *` objects. + */ ++ (NSArray *)supportedModes; + /** * Starts the delivery of position updates for the specified location. * @@ -214,3 +259,5 @@ didFailToUpdatePositionWithError:(NSError *)error; - (void)stopPositionUpdates; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationView.h b/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationView.h index 1786288..1ddefaa 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationView.h +++ b/EstimoteIndoorLocationSDK/Headers/EILIndoorLocationView.h @@ -7,6 +7,8 @@ @class EILPoint; @class EILOrientedPoint; +NS_ASSUME_NONNULL_BEGIN + /** * Width of the border around location shape. * Non-zero value is needed for objects like beacons @@ -50,10 +52,10 @@ didSelectObjectWithIdentifier:(NSString *)identifier; ///----------------------------------------- /** The delegate object to receive identifier of selected object in location view. */ -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak, nullable) id delegate; /** `EILLocation` object to be drawn. */ -@property (nonatomic, strong, readonly) EILLocation *location; +@property (nonatomic, strong, readonly, nullable) EILLocation *location; /** If YES, then a trace will be displayed. */ @property (nonatomic, assign) BOOL showTrace; @@ -70,13 +72,13 @@ didSelectObjectWithIdentifier:(NSString *)identifier; ///----------------------------------------- /** View representing current position indicator. */ -@property (nonatomic, strong) UIView *positionView; +@property (nonatomic, strong, nullable) UIView *positionView; /** Image used as current position indicator. */ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 -@property (nonatomic, strong) IBInspectable UIImage *positionImage; +@property (nonatomic, strong, nullable) IBInspectable UIImage *positionImage; #else -@property (nonatomic, strong) UIImage *positionImage; +@property (nonatomic, strong, nullable) UIImage *positionImage; #endif /** Color of the location boundary. */ @@ -189,7 +191,7 @@ didSelectObjectWithIdentifier:(NSString *)identifier; * region (defined by bounding box). * * @param location Object representing current location. - * @param regionOfInterest Region of interest to be drawn + * @param regionOfInterest Region of interest to be drawn. */ - (void)drawLocation:(EILLocation *)location inRegionOfInterest:(CGRect)regionOfInterest; @@ -205,7 +207,7 @@ didSelectObjectWithIdentifier:(NSString *)identifier; * * @param position Object representing current position in the location. */ -- (void)updatePosition:(EILOrientedPoint *)position; +- (void)updatePosition:(nullable EILOrientedPoint *)position; #pragma mark Drawing trace ///----------------------------------------- @@ -230,7 +232,7 @@ didSelectObjectWithIdentifier:(NSString *)identifier; * Background objects are drawn in order of addition below all other views. * Object will be rotated with regard to location to match orientation of the position. * Will throw an exception if called without first calling `drawLocation:`. - * Chosen identifier cannot be same as any beacon MAC address or kPositionViewIdentifier ("com.estimote.position.view"). + * Chosen identifier cannot be same as any beacon identifier or kPositionViewIdentifier ("com.estimote.position.view"). * * @param object View representing a real object. Cannot be nil. * @param position Object representing position in the location. Cannot be nil. @@ -260,14 +262,14 @@ didSelectObjectWithIdentifier:(NSString *)identifier; /** * Returns view for object that was previously added to location view. * - * For tapped beacon its MAC address will be returned. + * For tapped beacon its identifier will be returned. * For tapped position view kPositionViewIdentifier ("com.estimote.position.view") will be returned. * * @param identifier Unique identifier by which view is identified. Cannot be nil. * * @return view for object with provided identifier. */ -- (UIView *)objectWithidentifier:(NSString *)identifier; +- (nullable UIView *)objectWithidentifier:(NSString *)identifier; /** * Moves an object identified by identifier to a given position. @@ -353,3 +355,5 @@ didSelectObjectWithIdentifier:(NSString *)identifier; - (EILPoint *)calculateRealPointFromPicturePoint:(CGPoint)picturePoint; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILIndoorSDK.h b/EstimoteIndoorLocationSDK/Headers/EILIndoorSDK.h index 9997d0a..7952875 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILIndoorSDK.h +++ b/EstimoteIndoorLocationSDK/Headers/EILIndoorSDK.h @@ -1,7 +1,7 @@ // Copyright (c) 2015 Estimote. All rights reserved. /** Version of this iOS Indoor Location SDK. */ -#define EIL_IOS_INDOOR_SDK_VERSION_STRING @"2.0.1" +#define EIL_IOS_INDOOR_SDK_VERSION_STRING @"2.1.0" /** Library header, import this to import all of the public types in the Indoor SDK. */ @@ -30,3 +30,4 @@ #import "EILRequestFetchLocations.h" #import "EILRequestFetchPublicLocations.h" #import "EILRequestRemoveLocation.h" +#import "EILRequestModifyLocation.h" diff --git a/EstimoteIndoorLocationSDK/Headers/EILLocation.h b/EstimoteIndoorLocationSDK/Headers/EILLocation.h index d72beb7..b101403 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILLocation.h +++ b/EstimoteIndoorLocationSDK/Headers/EILLocation.h @@ -5,6 +5,9 @@ #import "EILLocationLinearObject.h" @class EILPoint; +@class EILPositionedBeacon; + +NS_ASSUME_NONNULL_BEGIN /** * Represents a physical location prepared for Estimote Indoor Location. Object is immutable. @@ -19,49 +22,52 @@ ///----------------------------------------- /** Globally unique identifier of the location. Identifier is being set by server once location is persisted. */ -@property (nonatomic, strong, readonly) NSString *identifier; +@property (nonatomic, strong, readonly, nullable) NSString *identifier; /** Name of the location. */ -@property (nonatomic, strong, readonly) NSString *name; +@property (nonatomic, strong, readonly) NSString *name; /** Geographical location of the location. */ -@property (nonatomic, strong, readonly) NSDictionary *geographicalLocation; +@property (nonatomic, strong, readonly, nullable) NSDictionary *geographicalLocation; /** Latitude of geographical location of the location */ -@property (nonatomic, strong, readonly) NSNumber *latitude; +@property (nonatomic, strong, readonly, nullable) NSNumber *latitude; /** Longitude of geographical location of the location */ -@property (nonatomic, strong, readonly) NSNumber *longitude; +@property (nonatomic, strong, readonly, nullable) NSNumber *longitude; /** Email address of the owner of the location. */ -@property (nonatomic, strong, readonly) NSString *owner; +@property (nonatomic, strong, readonly, nullable) NSString *owner; /** Visibility of the location (private/public). */ -@property (nonatomic, assign, readonly) BOOL isPublic; +@property (nonatomic, assign, readonly) BOOL isPublic; -/** Boundary of the location. Array of `EILOrientedLineSegment`. */ -@property (nonatomic, strong, readonly) NSArray *boundarySegments; +/** Boundary of the location. */ +@property (nonatomic, strong, readonly) NSArray *boundarySegments; /** Bezier path of the boundary of the location. */ -@property (nonatomic, strong, readonly) UIBezierPath *shape; +@property (nonatomic, strong, readonly) UIBezierPath *shape; + +/** Polygon of shape of the location. Points are sorted clockwise. */ +@property (nonatomic, strong, readonly, nullable) NSArray *polygon; /** Area of the location in square meters. */ -@property (nonatomic, assign, readonly) double area; +@property (nonatomic, assign, readonly) double area; /** Bounding box of the location. */ -@property (nonatomic, assign, readonly) CGRect boundingBox; +@property (nonatomic, assign, readonly) CGRect boundingBox; -/** Linear objects inside the location. Array of `EILLocationLinearObject`. */ -@property (nonatomic, strong, readonly) NSArray *linearObjects; +/** Linear objects inside the location. */ +@property (nonatomic, strong, readonly) NSArray *linearObjects; -/** Beacons located in the location. Array of `EILPositionedBeacon`. */ -@property (nonatomic, strong, readonly) NSArray *beacons; +/** Beacons located in the location. */ +@property (nonatomic, strong, readonly) NSArray *beacons; /** Orientation to magnetic north, counted clockwise. Value is in degrees. */ -@property (nonatomic, assign, readonly) double orientation; +@property (nonatomic, assign, readonly) double orientation; /** Creation date. */ -@property (nonatomic, strong, readonly) NSDate *creationDate; +@property (nonatomic, strong, readonly) NSDate *creationDate; #pragma mark Creating and Initializing @@ -96,7 +102,7 @@ * @param dict `NSDictionary` to deserialize from. * @return A location created from `NSDictionary`. */ -+ (EILLocation *)locationFromDictionary:(NSDictionary *)dict; ++ (nullable EILLocation *)locationFromDictionary:(NSDictionary *)dict; /** * Serializes the point to `NSDictionary`. @@ -142,9 +148,9 @@ * Filters this location linear objects and returns only those for given type. * * @param type Type of linear object to filter this location linear objects. -* @return Array of `EILLocationLinearObject` with given type. +* @return Linear objects with given type. */ -- (NSArray *)linearObjectsWithType:(EILLocationLinearObjectType)type; +- (NSArray *)linearObjectsWithType:(EILLocationLinearObjectType)type; #pragma Identifying and Comparing Objects ///----------------------------------------- @@ -178,3 +184,5 @@ - (NSString *)description; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILLocationBuilder.h b/EstimoteIndoorLocationSDK/Headers/EILLocationBuilder.h index 97440ea..e572ff0 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILLocationBuilder.h +++ b/EstimoteIndoorLocationSDK/Headers/EILLocationBuilder.h @@ -1,6 +1,7 @@ // Copyright (c) 2014 Estimote. All rights reserved. #import +#import #define EIL_LOCATION_DEFAULT_NAME @"MyEstimoteLocation" @@ -16,6 +17,9 @@ typedef NS_ENUM(int, EILLocationBuilderSide) { @class EILLocation; @class EILOrientedPoint; +@class EILPoint; + +NS_ASSUME_NONNULL_BEGIN /** `EILLocationBuilder` is a builder object for creating `EILLocation` objects. @@ -43,10 +47,10 @@ in the same order as the points. There are following 4 segments: [(0,0), (0,5)], The next step is to place beacons, doors on the boundary segments of the location: - [locationBuilder addBeaconIdentifiedByMac:@"63d4819e6a1d" - atBoundarySegmentIndex:0 - inDistance:2 - fromSide:EILLocationBuilderLeftSide]; + [locationBuilder addBeaconWithIdentifier:@"63d4819e6a1d" + atBoundarySegmentIndex:0 + inDistance:2 + fromSide:EILLocationBuilderLeftSide]; */ @interface EILLocationBuilder : NSObject @@ -59,9 +63,9 @@ The next step is to place beacons, doors on the boundary segments of the locatio /** * Adds a list of boundary points of location. Can be added clockwise or counter clockwise. * - * @param boundaryPoints List of boundary points (`EILPoint`) that defines a location. + * @param boundaryPoints List of boundary points that defines a location. */ -- (void)setLocationBoundaryPoints:(NSArray *)boundaryPoints; +- (void)setLocationBoundaryPoints:(NSArray *)boundaryPoints; /** * Sets the orientation of the room with respect to the magnetic north. Counted clockwise in degrees. @@ -79,15 +83,78 @@ The next step is to place beacons, doors on the boundary segments of the locatio * Places a beacon on the boundary segment. * Boundary segments were created in the same order as points were added. * - * @param macAddress MAC address of the beacon (lowercase, no colons, e.g. "63d4819e6a1d"). + * @param identifier Beacon identifier (MAC address or identifier). + * @param boundarySegmentIndex Index of the boundary segment. + * @param distance Distance from the beacon to the side of the boundary segment. + * @param side Side of the boundary segment as seen from inside of the location. + */ +- (void)addBeaconWithIdentifier:(NSString *)identifier + atBoundarySegmentIndex:(NSUInteger)boundarySegmentIndex + inDistance:(double)distance + fromSide:(EILLocationBuilderSide)side; + +/** + * Places a beacon in the location. + * + * @param identifier Beacon identifier (MAC address or identifier). + * @param position Coordinates of the beacon position. + */ +- (void)addBeaconWithIdentifier:(NSString *)identifier + withPosition:(EILOrientedPoint *)position; + +/** + * Places a beacon in the location. + * + * @param identifier Beacon identifier (MAC address or identifier). + * @param position Coordinates of the beacon position. + * @param color Color of the beacon. + */ +- (void)addBeaconWithIdentifier:(NSString *)identifier + withPosition:(EILOrientedPoint *)position + andColor:(ESTColor)color; + +/** + * Places a beacon on the boundary segment. + * Boundary segments were created in the same order as points were added. + * + * @param macAddress Beacon MAC address. * @param boundarySegmentIndex Index of the boundary segment. * @param distance Distance from the beacon to the side of the boundary segment. * @param side Side of the boundary segment as seen from inside of the location. + * + * This method is deprecated. Use addBeaconWithIdentifier:atBoundarySegmentIndex:inDistance:fromSide: instead. */ - (void)addBeaconIdentifiedByMac:(NSString *)macAddress atBoundarySegmentIndex:(NSUInteger)boundarySegmentIndex inDistance:(double)distance - fromSide:(EILLocationBuilderSide)side; + fromSide:(EILLocationBuilderSide)side + __deprecated_msg("Use addBeaconWithIdentifier:atBoundarySegmentIndex:inDistance:fromSide: instead."); + +/** + * Places a beacon in the location. + * + * @param macAddress Beacon MAC address. + * @param position Coordinates of the beacon position. + * + * This method is deprecated. Use addBeaconWithIdentifier:withPosition: instead. + */ +- (void)addBeaconIdentifiedByMac:(NSString *)macAddress + withPosition:(EILOrientedPoint *)position + __deprecated_msg("Use addBeaconWithIdentifier:withPosition: instead."); + +/** + * Places a beacon in the location. + * + * @param macAddress Beacon MAC address. + * @param position Coordinates of the beacon position. + * @param color Color of the beacon. + * + * This method is deprecated. Use addBeaconWithIdentifier:withPosition:andColor: instead. + */ +- (void)addBeaconIdentifiedByMac:(NSString *)macAddress + withPosition:(EILOrientedPoint *)position + andColor:(ESTColor)color + __deprecated_msg("Use addBeaconWithIdentifier:withPosition:andColor: instead."); /** * Places a door on the boundary segment. @@ -141,18 +208,18 @@ The next step is to place beacons, doors on the boundary segments of the locatio * * @return A valid location. */ -- (EILLocation *)build; +- (nullable EILLocation *)build; /** -* Parses JSON string representation of the location. You might have it from the app -* through "Export location code snippet". -* -* If location cannot be constructed based on JSON, an exception will be raised with -* explanation why it has happened. -* -* @param json JSON encoded as a string representation of the location. -* @return Location object built based upon the JSON. Returns nil if location cannot be built. -*/ -+ (EILLocation *)parseFromJSON:(NSString *)json; + * Parses JSON string representation of the location. You might have it from the older version of the app through "Export location code snippet". + * + * If location cannot be constructed based on JSON, an exception will be raised with explanation why it has happened. + * + * @param json JSON encoded as a string representation of the location. + * @return Location object built based upon the JSON. Returns nil if location cannot be built. + */ ++ (nullable EILLocation *)parseFromJSON:(NSString *)json; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILLocationLinearObject.h b/EstimoteIndoorLocationSDK/Headers/EILLocationLinearObject.h index 5290a61..1d16e1c 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILLocationLinearObject.h +++ b/EstimoteIndoorLocationSDK/Headers/EILLocationLinearObject.h @@ -15,6 +15,8 @@ typedef enum : NSUInteger { EILLocationLinearObjectTypeWindow, } EILLocationLinearObjectType; +NS_ASSUME_NONNULL_BEGIN + /** * Represents an object in a location which position can be described by a line segment. * Typical examples are doors, windows, internal partition walls etc. @@ -84,7 +86,7 @@ typedef enum : NSUInteger { * @param dict NSDictionary to deserialize from. * @return A linear object created from NSDictionary. */ -+ (EILLocationLinearObject *)linearObjectFromDictionary:(NSDictionary *)dict; ++ (nullable EILLocationLinearObject *)linearObjectFromDictionary:(NSDictionary *)dict; /** * Serializes the linear object to `NSDictionary`. @@ -117,8 +119,13 @@ typedef enum : NSUInteger { /// @name Describing Objects ///----------------------------------------- +/** + * Returns a string representation of the location linear object. + * + * @return A string representation of the location linear object. + */ - (NSString *)description; @end - +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILOrientedLineSegment.h b/EstimoteIndoorLocationSDK/Headers/EILOrientedLineSegment.h index e6e1622..8cf0003 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILOrientedLineSegment.h +++ b/EstimoteIndoorLocationSDK/Headers/EILOrientedLineSegment.h @@ -5,6 +5,8 @@ @class EILPoint; @class EILOrientedPoint; +NS_ASSUME_NONNULL_BEGIN + /** * Represents a geometrical line segment with additional information about orientation. * Object is immutable. @@ -91,6 +93,28 @@ */ - (EILOrientedPoint *)centerPoint; +/** + * Calculates left point of the line. + * + * If the orientation of the line is pointing at you, the left point will be on the left. + * + * If the line does not have an orientation nil will be returned. + * + * @return An oriented point representing left point of the line. It will have the same orientation as the line. + */ +- (EILOrientedPoint *)leftPoint; + +/** + * Calculates right point of the line. + * + * If the orientation of the line is pointing at you, the right point will be on the right. + * + * If the line does not have an orientation nil will be returned. + * + * @return An oriented point representing right point of the line. It will have the same orientation as the line. + */ +- (EILOrientedPoint *)rightPoint; + /** * Calculates length of the line segment. * @@ -119,7 +143,7 @@ * @param dict NSDictionary to deserialize from. * @return An oriented line segment created from NSDictionary. */ -+ (EILOrientedLineSegment *)lineFromDictionary:(NSDictionary *)dict; ++ (nullable EILOrientedLineSegment *)lineFromDictionary:(NSDictionary *)dict; /** * Serializes the oriented line segment to `NSDictionary`. @@ -157,6 +181,8 @@ * * @return A string representation of the oriented line segment in form of ((x1,y1),(x2,y2), orientation) */ --(NSString *)description; +- (NSString *)description; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILOrientedPoint.h b/EstimoteIndoorLocationSDK/Headers/EILOrientedPoint.h index e6e6387..8c6672b 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILOrientedPoint.h +++ b/EstimoteIndoorLocationSDK/Headers/EILOrientedPoint.h @@ -8,6 +8,7 @@ */ #define EIL_ORIENTATION_UNDEFINED -1 +NS_ASSUME_NONNULL_BEGIN /** Represents a geometrical point with additional information about orientation. Object is immutable. */ @interface EILOrientedPoint : EILPoint @@ -116,7 +117,7 @@ * @param dict NSDictionary to deserialize from. * @return An oriented point created from NSDictionary. */ -+ (EILOrientedPoint *)pointFromDictionary:(NSDictionary *)dict; ++ (nullable EILOrientedPoint *)pointFromDictionary:(NSDictionary *)dict; /** * Serializes the oriented point to `NSDictionary`. @@ -154,14 +155,17 @@ * * @return A string representation of the point in form of (x,y, orientation) */ --(NSString *)description; +- (NSString *)description; #pragma mark Encoding and Decoding ///----------------------------------------- /// @name Encoding and Decoding ///----------------------------------------- -- (id)initWithCoder:(NSCoder *)coder; +- (nullable instancetype)initWithCoder:(NSCoder *)coder; - (void)encodeWithCoder:(NSCoder *)coder; + @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILPoint.h b/EstimoteIndoorLocationSDK/Headers/EILPoint.h index e080027..8e5a679 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILPoint.h +++ b/EstimoteIndoorLocationSDK/Headers/EILPoint.h @@ -2,6 +2,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + /** Represents a geometrical point. Object is immutable. */ @interface EILPoint : NSObject @@ -89,7 +91,7 @@ * @param dict NSDictionary to deserialize from. * @return A point created from NSDictionary. */ -+ (EILPoint *)pointFromDictionary:(NSDictionary *)dict; ++ (nullable EILPoint *)pointFromDictionary:(NSDictionary *)dict; /** * Serializes the point to `NSDictionary`. @@ -134,8 +136,10 @@ ///----------------------------------------- /// @name Encoding and Decoding ///----------------------------------------- -- (id)initWithCoder:(NSCoder *)coder; +- (nullable instancetype)initWithCoder:(NSCoder *)coder; - (void)encodeWithCoder:(NSCoder *)coder; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILPositionView.h b/EstimoteIndoorLocationSDK/Headers/EILPositionView.h index 2255f29..d73d891 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILPositionView.h +++ b/EstimoteIndoorLocationSDK/Headers/EILPositionView.h @@ -4,6 +4,8 @@ #import #import "EILIndoorLocationManager.h" +NS_ASSUME_NONNULL_BEGIN + /** * View representing current position indicator with accuracy circle. * It adjusts itself to always show correctly accuracy in scale. @@ -44,3 +46,5 @@ - (void)updateAccuracy:(EILPositionAccuracy)accuracy; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILPositionedBeacon.h b/EstimoteIndoorLocationSDK/Headers/EILPositionedBeacon.h index 8a3fe51..bf4990e 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILPositionedBeacon.h +++ b/EstimoteIndoorLocationSDK/Headers/EILPositionedBeacon.h @@ -5,6 +5,8 @@ @class EILOrientedPoint; +NS_ASSUME_NONNULL_BEGIN + /** Represents a beacon with additional information about its position. Object is immutable. */ @interface EILPositionedBeacon : NSObject @@ -15,16 +17,18 @@ /** Oriented point representing beacons position and orientation. */ @property (nonatomic, strong, readonly) EILOrientedPoint *position; +/** Beacons identifier. */ +@property (nonatomic, strong, readonly) NSString *identifier; /** Beacons mac address. */ -@property (nonatomic, strong, readonly) NSString *macAddress; +@property (nonatomic, strong, readonly) NSString *macAddress __attribute ((deprecated(("Use identifier instead.")))); /** Beacons color. */ @property (nonatomic, assign, readonly) ESTColor color; /** Beacons proximity UUID. Can be nil, if unknown. */ -@property (nonatomic, strong, readonly) NSUUID *proximityUUID; +@property (nonatomic, strong, readonly, nullable) NSUUID *proximityUUID; /** Beacons major value. Can be nil, if unknown. */ -@property (nonatomic, strong, readonly) NSNumber *major; +@property (nonatomic, strong, readonly, nullable) NSNumber *major; /** Beacons minor value. Can be nil, if unknown. */ -@property (nonatomic, strong, readonly) NSNumber *minor; +@property (nonatomic, strong, readonly, nullable) NSNumber *minor; #pragma mark Creating and Initializing Beacons @@ -32,15 +36,58 @@ /// @name Creating and Initializing Beacons ///----------------------------------------- +/** + * Returns a new beacon object. + * + * @param identifier Beacon identifier (MAC address or identifier). + * @param position Beacon position. + * @return A positioned beacon initialized with identifier and position. + */ +- (instancetype)initWithBeaconIdentifier:(NSString *)identifier + position:(EILOrientedPoint *)position; + +/** + * Designated initializer. Returns a new beacon object. + * + * @param identifier Beacon identifier (MAC address or identifier). + * @param position Beacon position. + * @param color Beacon color + * @return A positioned beacon initialized with identifier and position. + */ +- (instancetype)initWithBeaconIdentifier:(NSString *)identifier + position:(EILOrientedPoint *)position + color:(ESTColor)color; + +/** + * Designated initializer. Returns a new beacon object. + * + * @param identifier Beacon identifier (MAC address or identifier). + * @param position Beacon position. + * @param color Beacon color + * @param proximityUUID Beacon proximity UUID. + * @param major Beacon major value. + * @param minor Beacon minor value. + * @return A positioned beacon initialized with provided data. + */ +- (instancetype)initWithBeaconIdentifier:(NSString *)identifier + position:(EILOrientedPoint *)position + color:(ESTColor)color + proximityUUID:(nullable NSUUID *)proximityUUID + major:(nullable NSNumber *)major + minor:(nullable NSNumber *)minor; + /** * Returns a new beacon object. * * @param macAddress Beacon MAC address. * @param position Beacon position. * @return A positioned beacon initialized with MAC and position. + * + * This method is deprecated. Use initWithBeaconIdentifier:position: instead. */ - (instancetype)initWithBeaconIdentifiedByMac:(NSString *)macAddress - withPosition:(EILOrientedPoint *)position; + withPosition:(EILOrientedPoint *)position + __deprecated_msg("Use initWithBeaconIdentifier:position: instead."); /** * Designated initializer. Returns a new beacon object. @@ -49,10 +96,13 @@ * @param position Beacon position. * @param color Beacon color * @return A positioned beacon initialized with MAC and position. + * + * This method is deprecated. Use initWithBeaconIdentifier:position:color: instead. */ - (instancetype)initWithBeaconIdentifiedByMac:(NSString *)macAddress withPosition:(EILOrientedPoint *)position - color:(ESTColor)color; + color:(ESTColor)color + __deprecated_msg("Use initWithBeaconIdentifier:position:color: instead."); /** * Designated initializer. Returns a new beacon object. @@ -64,13 +114,16 @@ * @param major Beacon major value. * @param minor Beacon minor value. * @return A positioned beacon initialized with provided data. + * + * This method is deprecated. Use initWithBeaconIdentifier:position:color:proximityUUID:major:minor: instead. */ - (instancetype)initWithBeaconIdentifiedByMac:(NSString *)macAddress withPosition:(EILOrientedPoint *)position color:(ESTColor)color - proximityUUID:(NSUUID *)proximityUUID - major:(NSNumber *)major - minor:(NSNumber *)minor; + proximityUUID:(nullable NSUUID *)proximityUUID + major:(nullable NSNumber *)major + minor:(nullable NSNumber *)minor + __deprecated_msg("Use initWithBeaconIdentifier:position:color:proximityUUID:major:minor: instead."); /** * Returns a new beacon object. @@ -93,7 +146,7 @@ * @param dict `NSDictionary` to deserialize from. * @return A positioned beacon created from `NSDictionary`. */ -+ (EILPositionedBeacon *)beaconFromDictionary:(NSDictionary *)dict; ++ (nullable EILPositionedBeacon *)beaconFromDictionary:(NSDictionary *)dict; /** * Serializes the positioned beacon to `NSDictionary`. @@ -136,6 +189,8 @@ * * @return A string representation of the EILPositionedBeacon. */ --(NSString *)description; +- (NSString *)description; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILRequestAddLocation.h b/EstimoteIndoorLocationSDK/Headers/EILRequestAddLocation.h index c9621ec..776839b 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILRequestAddLocation.h +++ b/EstimoteIndoorLocationSDK/Headers/EILRequestAddLocation.h @@ -5,10 +5,12 @@ @class EILLocation; +NS_ASSUME_NONNULL_BEGIN + /** * A block object to be executed when the request finishes. */ -typedef void(^EILRequestAddLocationBlock)(EILLocation *location, NSError *error); +typedef void(^EILRequestAddLocationBlock)(EILLocation * _Nullable location, NSError * _Nullable error); /** * Request for saving new location in Estimote Cloud. @@ -36,3 +38,5 @@ typedef void(^EILRequestAddLocationBlock)(EILLocation *location, NSError *error) - (void)sendRequestWithCompletion:(EILRequestAddLocationBlock)completion; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocation.h b/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocation.h index 5795809..e5b2b9e 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocation.h +++ b/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocation.h @@ -5,10 +5,12 @@ @class EILLocation; +NS_ASSUME_NONNULL_BEGIN + /** * A block object to be executed when the request finishes. */ -typedef void(^EILRequestFetchLocationBlock)(EILLocation *location, NSError *error); +typedef void(^EILRequestFetchLocationBlock)(EILLocation * _Nullable location, NSError * _Nullable error); /** * Request to fetch location identified by its identifier. @@ -36,3 +38,5 @@ typedef void(^EILRequestFetchLocationBlock)(EILLocation *location, NSError *erro - (void)sendRequestWithCompletion:(EILRequestFetchLocationBlock)completion; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocations.h b/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocations.h index ec90e68..eaf2e52 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocations.h +++ b/EstimoteIndoorLocationSDK/Headers/EILRequestFetchLocations.h @@ -3,10 +3,14 @@ #import #import +@class EILLocation; + +NS_ASSUME_NONNULL_BEGIN + /** * A block object to be executed when the request finishes. Returns an array of `EILIndoorLocation` objects. */ -typedef void(^EILRequestFetchLocationsBlock)(NSArray *locations, NSError *error); +typedef void(^EILRequestFetchLocationsBlock)(NSArray * _Nullable locations, NSError * _Nullable error); /** * Request to fetch all locations from Estimote Cloud for currently authorised user. @@ -26,3 +30,5 @@ typedef void(^EILRequestFetchLocationsBlock)(NSArray *locations, NSError *error) - (void)sendRequestWithCompletion:(EILRequestFetchLocationsBlock)completion; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILRequestFetchPublicLocations.h b/EstimoteIndoorLocationSDK/Headers/EILRequestFetchPublicLocations.h index 00c4bd7..a336f3d 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILRequestFetchPublicLocations.h +++ b/EstimoteIndoorLocationSDK/Headers/EILRequestFetchPublicLocations.h @@ -5,26 +5,38 @@ @class EILLocation; +NS_ASSUME_NONNULL_BEGIN + /** * A block object to be executed when the request finishes. */ -typedef void(^EILRequestFetchPublicLocationsBlock)(NSArray *locations, NSError *error); +typedef void(^EILRequestFetchPublicLocationsBlock)(NSArray * _Nullable locations, NSError * _Nullable error); /** * Request to fetch public nearby locations and parsing response. * In order to determine nearby public locations, scan for nearby beacons. * All the locations that contain at least one of the given beacons (identified - * by their mac addresses) will be fetched. + * by their identifiers) will be fetched. */ @interface EILRequestFetchPublicLocations : ESTRequestPostJSON +/** + * Returns a new request object for fetching public locations for given beacons. + * + * @param identifiers An array containing identifiers of beacons that are used for fetching nearby public locations. + * @return A request initialized with identifiers of beacons. + */ +- (instancetype)initWithBeaconIdentifiers:(NSArray *)identifiers; + /** * Returns a new request object for fetching public locations for given beacons. * * @param beaconMacs An array of `NSString *` containing mac addresses of beacons that are used for fetching nearby public locations. * @return A request initialized with mac addresses of beacons. + * + * This method is deprecated. Use initWithBeaconIdentifiers: instead. */ -- (instancetype)initWithBeaconMacs:(NSArray *)beaconMacs; +- (instancetype)initWithBeaconMacs:(NSArray *)beaconMacs __deprecated_msg("Use initWithBeaconIdentifiers: instead."); /** * Sends request to Estimote Cloud with completion block. @@ -34,3 +46,5 @@ typedef void(^EILRequestFetchPublicLocationsBlock)(NSArray *locations, NSError * - (void)sendRequestWithCompletion:(EILRequestFetchPublicLocationsBlock)completion; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILRequestModifyLocation.h b/EstimoteIndoorLocationSDK/Headers/EILRequestModifyLocation.h new file mode 100644 index 0000000..817fa52 --- /dev/null +++ b/EstimoteIndoorLocationSDK/Headers/EILRequestModifyLocation.h @@ -0,0 +1,43 @@ +// Copyright © 2015 Estimote. All rights reserved. + +#import + +@class EILLocation; + +NS_ASSUME_NONNULL_BEGIN + +/** + * A block object to be executed when the request finishes. + */ +typedef void(^EILRequestModifyLocationBlock)(EILLocation * _Nullable location, NSError * _Nullable error); + +/** + * Request for modifying already existing location in Estimote Cloud. + * + * Note that in order to have request working you need to be authenticated in Estimote Cloud. + * To do that you have to call -[ESTConfig setupAppID:andAppToken:] first. + * You can find your API App ID and API App Token in the Apps: http://cloud.estimote.com/#/apps + * section of the Estimote Cloud: http://cloud.estimote.com/. + */ +@interface EILRequestModifyLocation : ESTRequestPutJSON + +/** + * Returns a new request object for modifying location in Estimote Cloud. + * + * @param location Modified location. + * @param locationIdentifier Identifier of location in Estimote Cloud that is to be modified. + * @return A request initialized with location and location identifier. + */ +- (instancetype)initWithLocation:(EILLocation *)location + locationIdentifier:(NSString *)locationIdentifier; + +/** + * Sends request to Estimote Cloud with completion block. + * + * param completion Completion block to be executed when the request finishes. + */ +- (void)sendRequestWithCompletion:(EILRequestModifyLocationBlock)completion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Headers/EILRequestRemoveLocation.h b/EstimoteIndoorLocationSDK/Headers/EILRequestRemoveLocation.h index db51706..fefda4b 100644 --- a/EstimoteIndoorLocationSDK/Headers/EILRequestRemoveLocation.h +++ b/EstimoteIndoorLocationSDK/Headers/EILRequestRemoveLocation.h @@ -5,10 +5,12 @@ @class EILLocation; +NS_ASSUME_NONNULL_BEGIN + /** * A block object to be executed when the request finishes. */ -typedef void(^EILRequestRemoveLocationBlock)(EILLocation *location, NSError *error); +typedef void(^EILRequestRemoveLocationBlock)(EILLocation * _Nullable location, NSError * _Nullable error); /** * Request for removing a new location from Estimote Cloud. @@ -36,3 +38,5 @@ typedef void(^EILRequestRemoveLocationBlock)(EILLocation *location, NSError *err - (void)sendRequestWithCompletion:(EILRequestRemoveLocationBlock)completion; @end + +NS_ASSUME_NONNULL_END diff --git a/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall.png b/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall.png index 60a0c7a..7eb5f16 100644 Binary files a/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall.png and b/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall@2x.png b/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall@2x.png index 9d90438..75f278a 100644 Binary files a/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall@2x.png and b/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall@2x.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall@3x.png b/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall@3x.png new file mode 100644 index 0000000..3311305 Binary files /dev/null and b/EstimoteIndoorLocationSDK/Resources/beaconBlueberrySmall@3x.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconIcySmall.png b/EstimoteIndoorLocationSDK/Resources/beaconIcySmall.png index 8e0b67b..7a220ba 100644 Binary files a/EstimoteIndoorLocationSDK/Resources/beaconIcySmall.png and b/EstimoteIndoorLocationSDK/Resources/beaconIcySmall.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconIcySmall@2x.png b/EstimoteIndoorLocationSDK/Resources/beaconIcySmall@2x.png index abf9e22..71ec16e 100644 Binary files a/EstimoteIndoorLocationSDK/Resources/beaconIcySmall@2x.png and b/EstimoteIndoorLocationSDK/Resources/beaconIcySmall@2x.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconIcySmall@3x.png b/EstimoteIndoorLocationSDK/Resources/beaconIcySmall@3x.png new file mode 100644 index 0000000..c2ea30a Binary files /dev/null and b/EstimoteIndoorLocationSDK/Resources/beaconIcySmall@3x.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconMintSmall.png b/EstimoteIndoorLocationSDK/Resources/beaconMintSmall.png index fab3f60..8384221 100644 Binary files a/EstimoteIndoorLocationSDK/Resources/beaconMintSmall.png and b/EstimoteIndoorLocationSDK/Resources/beaconMintSmall.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconMintSmall@2x.png b/EstimoteIndoorLocationSDK/Resources/beaconMintSmall@2x.png index 488d08f..f15a82d 100644 Binary files a/EstimoteIndoorLocationSDK/Resources/beaconMintSmall@2x.png and b/EstimoteIndoorLocationSDK/Resources/beaconMintSmall@2x.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beaconMintSmall@3x.png b/EstimoteIndoorLocationSDK/Resources/beaconMintSmall@3x.png new file mode 100644 index 0000000..0df3c29 Binary files /dev/null and b/EstimoteIndoorLocationSDK/Resources/beaconMintSmall@3x.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beacon_grey.png b/EstimoteIndoorLocationSDK/Resources/beacon_grey.png new file mode 100644 index 0000000..b3326d5 Binary files /dev/null and b/EstimoteIndoorLocationSDK/Resources/beacon_grey.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beacon_grey@2x.png b/EstimoteIndoorLocationSDK/Resources/beacon_grey@2x.png index c6af4f6..9d326be 100644 Binary files a/EstimoteIndoorLocationSDK/Resources/beacon_grey@2x.png and b/EstimoteIndoorLocationSDK/Resources/beacon_grey@2x.png differ diff --git a/EstimoteIndoorLocationSDK/Resources/beacon_grey@3x.png b/EstimoteIndoorLocationSDK/Resources/beacon_grey@3x.png new file mode 100644 index 0000000..ea1928d Binary files /dev/null and b/EstimoteIndoorLocationSDK/Resources/beacon_grey@3x.png differ diff --git a/EstimoteIndoorLocationSDK/libEstimoteIndoorSDK.a b/EstimoteIndoorLocationSDK/libEstimoteIndoorSDK.a index 7bafd05..4a36194 100644 Binary files a/EstimoteIndoorLocationSDK/libEstimoteIndoorSDK.a and b/EstimoteIndoorLocationSDK/libEstimoteIndoorSDK.a differ diff --git a/README.md b/README.md index 1664888..ec2af18 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Learn more: Indoor Location SDK enables creating location through builder and obtaining position updates from the location. Besides location builder there is also possibility of mapping location through Estimote Indoor Location App. -The mapping process is simple and fast. Start by placing one beacon immediately to the right of the room's entrance at about chest height. Affix a single beacon in the center of each of the remaining walls. Then walk from beacon to beacon keeping as close to the perimeter of the space as possible. While walking, hold your phone in front of you. Stop at each beacon along the way, holding the phone next to it, to complete this one-time configuration process. +The mapping process is simple. First, you'll need to map the shape. Start by walking around a location and stick as close to the perimeter as possible. Remember to hold the phone in front of you for the location to be mapped properly. The app will now suggest the number and placement of beacons. Affix them on the walls at chest height. To finalize the process walk around the location once more (again with the phone in front of you). Stop at each beacon along the way, to complete this one-time configuration process. There is a nice video tutorial by [@phillydev716](https://twitter.com/phillydev716) on [YouTube on how to use Indoor Location in your app](https://www.youtube.com/watch?v=BjXHBBvrWQ0). Please note, that video tutorial uses older version of our SDK (v.1.6). @@ -133,15 +133,19 @@ EILLocationBuilder *locationBuilder = [EILLocationBuilder new]; Points that define the shape of location also define its boundary segments. They are indexed in the same order as the points. In this example there would be the following 4 segments: [(0,0), (0,5)], [(0,5), (5,5)], [(5,5), (5,0)], [(5,0), (0,0)]. -The next step is to place beacons and doors on the boundary segments of the location: +The next step is to place beacons and doors in the location: ```objective-c -[locationBuilder addBeaconIdentifiedByMac:@"aabbccddeeff" +[locationBuilder addBeaconIdentifiedByIdentifier:@"aabbccddeeff" atBoundarySegmentIndex:0 inDistance:2 fromSide:EILLocationBuilderLeftSide]; ``` +Using ```ESTIndoorLocationBuilder``` you can also place beacons inside the location (addBeaconWithIdentifier:withPosition:, addBeaconWithIdentifier:withPosition:andColor:), which is not possible with mapping tool in Indoor Location App. + +Note that methods used for adding beacons that are identified by their mac addresses are now depracated. Please use methods using identification by identifier instead. + #### Via Estimote Indoor Location App Using [Estimote App](https://itunes.apple.com/us/app/estimote/id686915066?mt=8) the procedure consists of the following steps: @@ -178,6 +182,17 @@ Note, that you need only one Indoor Location Manager to monitor multiple locatio ``` In order to have Indoor Location status change and position updates without delay, you should start Indoor Location Manager and monitioring for Indoor Location early. +EILIndoorLocationManager position updates can be delivered in two different modes. Modes differ in accuracy, stability and responsiveness. Depending on the mode system resource usage may be different. +- `EILIndoorLocationManagerModeNormal` - Delivers most accurate and responsive position updates at the cost of high system resource usage. To achieve best results user should hold phone in hand in portrait orientation. This is default mode of `EILIndoorLocationManager`. +- `EILIndoorLocationManagerModeLight` - Delivers stable, but a bit less responsive position updates. Has a very low system resource usage. + +In order to change mode simply change `mode` property of `EILIndoorLocationManager` object. + +```objective-c +indoorLocationManager.mode = EILIndoorLocationManagerModeLight; +``` +If the position updates delivery is in progress it will effectively restart position updates with new mode. + ### Managing locations in the Estimote Cloud To manage your locations, you can use requests that allows communication with Estimote Cloud. @@ -188,6 +203,7 @@ Provided requests are as follows: - ```EILRequestFetchLocation``` - request for fetching location identified by its identifier. Location has to be public or belong to currently authorized user - ```EILRequestFetchPublicLocations``` - request for fetching public nearby locations - ```EILRequestFetchLocations``` - request for fetching locations from Estimote Cloud for currently authorized user +- ```EILRequestModifyLocation``` - request for modifying already existing location in Estimote Cloud Each location saved in Estimote Cloud is given a unique string identifier that corresponds to the `identifier` property of `EILLocation`. You can find it on cloud.estimote.com, on the "Locations" screen, and use it with the Indoor SDK to, among other things, fetch your stored location from Estimote Cloud. Example of fetching location by identifier can be seen below: