Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Version 2.1.0:
Browse files Browse the repository at this point in the history
- `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.
  • Loading branch information
Agnieszka Kaczmarczyk committed Feb 4, 2016
1 parent 1249c9f commit 0e31871
Show file tree
Hide file tree
Showing 32 changed files with 407 additions and 83 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
51 changes: 49 additions & 2 deletions EstimoteIndoorLocationSDK/Headers/EILIndoorLocationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

#import <Foundation/Foundation.h>

/**
* 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.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -111,7 +138,7 @@ didFailToUpdatePositionWithError:(NSError *)error;
/**
* The delegate object to receive position update events.
*/
@property (nonatomic, weak) id <EILIndoorLocationManagerDelegate> delegate;
@property (nonatomic, weak, nullable) id <EILIndoorLocationManagerDelegate> delegate;

/**
* Starts `Indoor Location Manager`.
Expand Down Expand Up @@ -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<EILLocation *> *monitoredLocations;

/**
* Determines state for the monitored location.
Expand Down Expand Up @@ -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<NSNumber *> *)supportedModes;

/**
* Starts the delivery of position updates for the specified location.
*
Expand All @@ -214,3 +259,5 @@ didFailToUpdatePositionWithError:(NSError *)error;
- (void)stopPositionUpdates;

@end

NS_ASSUME_NONNULL_END
24 changes: 14 additions & 10 deletions EstimoteIndoorLocationSDK/Headers/EILIndoorLocationView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,10 +52,10 @@ didSelectObjectWithIdentifier:(NSString *)identifier;
///-----------------------------------------

/** The delegate object to receive identifier of selected object in location view. */
@property (nonatomic, weak) id <EILIndoorLocationViewDelegate> delegate;
@property (nonatomic, weak, nullable) id <EILIndoorLocationViewDelegate> 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;
Expand All @@ -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. */
Expand Down Expand Up @@ -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;
Expand All @@ -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
///-----------------------------------------
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -353,3 +355,5 @@ didSelectObjectWithIdentifier:(NSString *)identifier;
- (EILPoint *)calculateRealPointFromPicturePoint:(CGPoint)picturePoint;

@end

NS_ASSUME_NONNULL_END
3 changes: 2 additions & 1 deletion EstimoteIndoorLocationSDK/Headers/EILIndoorSDK.h
Original file line number Diff line number Diff line change
@@ -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. */
Expand Down Expand Up @@ -30,3 +30,4 @@
#import "EILRequestFetchLocations.h"
#import "EILRequestFetchPublicLocations.h"
#import "EILRequestRemoveLocation.h"
#import "EILRequestModifyLocation.h"
50 changes: 29 additions & 21 deletions EstimoteIndoorLocationSDK/Headers/EILLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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<EILOrientedLineSegment *> *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<EILPoint *> *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<EILLocationLinearObject *> *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<EILPositionedBeacon *> *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
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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<EILLocationLinearObject *> *)linearObjectsWithType:(EILLocationLinearObjectType)type;

#pragma Identifying and Comparing Objects
///-----------------------------------------
Expand Down Expand Up @@ -178,3 +184,5 @@
- (NSString *)description;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 0e31871

Please sign in to comment.