Skip to content

Commit

Permalink
Frequency change to advertising interval
Browse files Browse the repository at this point in the history
Beacon update lookup added
Library name changed from libEstimoteSDK7.a to libEstimoteSDK.a
  • Loading branch information
martinklimek committed Dec 2, 2013
1 parent 2425816 commit 659c3aa
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 34 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## 1.1.0 (December 2, 2013)

Features:

- Frequency change to Advertising Interval (Naming convention - check DOC)
- Checking for firmware update, with update details info
- Changlog for tags added
- library name changed from libEstimoteSDK7.a to libEstimoteSDK.a

Bugfixes:

- Variable type for Major, Minor, Power, Adv. Interval change to unsigned short
- startEstimoteBeaconsDiscoveryForRegion: corrected beacon array refresh


## 1.0.0 (November 7, 2013)

Features:

- Ranging and monitoring Estimote beacons
- Beacon connection support
- Read/Write of Major, Minor, Power and Frequency (Battery, Firmware and Hardware version - readonly)
- Beacon Firmware update support

6 changes: 4 additions & 2 deletions DinstanceDemo/DinstanceDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
2F0CE79E184CB039000E8805 /* libEstimoteSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F0CE79D184CB039000E8805 /* libEstimoteSDK.a */; };
2FC6D47117F42242007D8573 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D47017F42242007D8573 /* Foundation.framework */; };
2FC6D47317F42242007D8573 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D47217F42242007D8573 /* CoreGraphics.framework */; };
2FC6D47517F42242007D8573 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D47417F42242007D8573 /* UIKit.framework */; };
Expand All @@ -24,7 +25,6 @@
2FC6D4A817F424EC007D8573 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4A717F424EC007D8573 /* SystemConfiguration.framework */; };
2FC6D4AA17F42502007D8573 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4A917F42502007D8573 /* CoreBluetooth.framework */; };
2FC6D4AC17F42509007D8573 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4AB17F42509007D8573 /* CoreLocation.framework */; };
2FC6D4BC17F43139007D8573 /* libEstimoteSDK7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4BB17F43139007D8573 /* libEstimoteSDK7.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -38,6 +38,7 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2F0CE79D184CB039000E8805 /* libEstimoteSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libEstimoteSDK.a; path = ../EstimoteSDK/libEstimoteSDK.a; sourceTree = "<group>"; };
2FC6D46D17F42242007D8573 /* DinstanceDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DinstanceDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
2FC6D47017F42242007D8573 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
2FC6D47217F42242007D8573 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -68,10 +69,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2F0CE79E184CB039000E8805 /* libEstimoteSDK.a in Frameworks */,
2FC6D4AC17F42509007D8573 /* CoreLocation.framework in Frameworks */,
2FC6D4AA17F42502007D8573 /* CoreBluetooth.framework in Frameworks */,
2FC6D4A817F424EC007D8573 /* SystemConfiguration.framework in Frameworks */,
2FC6D4BC17F43139007D8573 /* libEstimoteSDK7.a in Frameworks */,
2FC6D47317F42242007D8573 /* CoreGraphics.framework in Frameworks */,
2FC6D47517F42242007D8573 /* UIKit.framework in Frameworks */,
2FC6D47117F42242007D8573 /* Foundation.framework in Frameworks */,
Expand Down Expand Up @@ -113,6 +114,7 @@
2FC6D46F17F42242007D8573 /* Frameworks */ = {
isa = PBXGroup;
children = (
2F0CE79D184CB039000E8805 /* libEstimoteSDK.a */,
2FC6D4BB17F43139007D8573 /* libEstimoteSDK7.a */,
2FC6D4AB17F42509007D8573 /* CoreLocation.framework */,
2FC6D4A917F42502007D8573 /* CoreBluetooth.framework */,
Expand Down
45 changes: 28 additions & 17 deletions EstimoteSDK/Headers/ESTBeacon.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// ESTBeacon.h
// EstimoteSDK7
// EstimoteSDK
//
// Version : 1.0.0
// Version : 1.1.0
// Created by Marcin Klimek on 9/19/13.
// Copyright (c) 2013 Estimote. All rights reserved.
//
Expand Down Expand Up @@ -92,7 +92,7 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
// properties filled when read characteristic

@property (nonatomic, strong) NSNumber* power;
@property (nonatomic, strong) NSNumber* frequency;
@property (nonatomic, strong) NSNumber* advInterval;
@property (nonatomic, strong) NSNumber* batteryLevel;

@property (nonatomic, strong) NSString* hardwareVersion;
Expand All @@ -110,7 +110,7 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
/**
* Connect to particular beacon using bluetooth.
* Connection is required to change values like
* Major, Minor, Power and Frequency.
* Major, Minor, Power and Advertising interval.
*
* @return void
*/
Expand All @@ -131,7 +131,7 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
*
* @return void
*/
- (void)readBeaconMajorWithCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)readBeaconMajorWithCompletion:(ESTUnsignedShortCompletionBlock)completion;

/**
* Read minor of connected beacon (Previous connection
Expand All @@ -141,17 +141,17 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
*
* @return void
*/
- (void)readBeaconMinorWithCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)readBeaconMinorWithCompletion:(ESTUnsignedShortCompletionBlock)completion;

/**
* Read frequency of connected beacon (Previous connection
* Read advertising interval of connected beacon (Previous connection
* required)
*
* @param completion block with frequency value as param
* @param completion block with advertising interval value as param
*
* @return void
*/
- (void)readBeaconFrequencyWithCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)readBeaconAdvIntervalWithCompletion:(ESTUnsignedShortCompletionBlock)completion;


/**
Expand All @@ -162,7 +162,7 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
*
* @return float value of beacon power
*/
- (void)readBeaconPowerWithCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)readBeaconPowerWithCompletion:(ESTPowerCompletionBlock)completion;

/**
* Read battery level of connected beacon (Previous connection
Expand All @@ -172,7 +172,7 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
*
* @return void
*/
- (void)readBeaconBatteryWithCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)readBeaconBatteryWithCompletion:(ESTUnsignedShortCompletionBlock)completion;

/**
* Read firmware version of connected beacon (Previous connection
Expand Down Expand Up @@ -203,7 +203,7 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
*
* @return void
*/
- (void)writeBeaconMajor:(short)major withCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)writeBeaconMajor:(unsigned short)major withCompletion:(ESTUnsignedShortCompletionBlock)completion;

/**
* Writes minor param to bluetooth connected beacon.
Expand All @@ -213,17 +213,17 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
*
* @return void
*/
- (void)writeBeaconMinor:(short)minor withCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)writeBeaconMinor:(unsigned short)minor withCompletion:(ESTUnsignedShortCompletionBlock)completion;

/**
* Writes frequency of bluetooth connected beacon.
* Writes advertising interval (in milisec) of connected beacon.
*
* @param frequency advertising beacon frequency
* @param advertising interval of beacon (50 - 2000 ms)
* @param completion block handling operation completion
*
* @return void
*/
- (void)writeBeaconFrequency:(short)frequency withCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)writeBeaconAdvInterval:(unsigned short)interval withCompletion:(ESTUnsignedShortCompletionBlock)completion;


/**
Expand All @@ -234,9 +234,20 @@ ESTBeacon class contains basic Apple CLBeacon object reference as well as some a
*
* @return void
*/
- (void)writeBeaconPower:(ESTBeaconPower)power withCompletion:(ESTUnsignedCompletionBlock)completion;
- (void)writeBeaconPower:(ESTBeaconPower)power withCompletion:(ESTPowerCompletionBlock)completion;


/**
* Verifies if new firmware version is available for download
* without any additional action. Internet connection
* is required to pass this process.
*
* @param completion Block handling operation completion
*
* @return void
*/
-(void)checkFirmwareUpdateWithCompletion:(ESTFirmwareUpdateCompletionBlock)completion;

/**
* Verifies if new firmware version is available for download
* and updates firmware of connected beacon. Internet connection
Expand Down
19 changes: 12 additions & 7 deletions EstimoteSDK/Headers/ESTBeaconDefinitions.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
//
// ESTBeaconDefinitions.h
// EstimoteSDK7
// EstimoteSDK
//
// Version : 1.0.0
// Version : 1.1.0
// Created by Marcin Klimek on 9/26/13.
// Copyright (c) 2013 Estimote. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ESTBeaconUpdateInfo.h"

////////////////////////////////////////////////////////////////////
// Type and class definitions


typedef void(^ESTCompletionBlock)(NSError* error);
typedef void(^ESTUnsignedCompletionBlock)(unsigned value, NSError* error);
typedef void(^ESTBoolCompletionBlock)(BOOL value, NSError* error);
typedef void(^ESTStringCompletionBlock)(NSString* value, NSError* error);

typedef enum : char
{
ESTBeaconPowerLevel1 = -30,
Expand All @@ -36,6 +32,15 @@ typedef enum : int
ESTBeaconFirmwareStateApp
} ESTBeaconFirmwareState;

typedef void(^ESTCompletionBlock)(NSError* error);
typedef void(^ESTFirmwareUpdateCompletionBlock)(BOOL updateAvailable, ESTBeaconUpdateInfo* updateInfo, NSError* error);
typedef void(^ESTUnsignedShortCompletionBlock)(unsigned short value, NSError* error);
typedef void(^ESTPowerCompletionBlock)(ESTBeaconPower value, NSError* error);
typedef void(^ESTBoolCompletionBlock)(BOOL value, NSError* error);
typedef void(^ESTStringCompletionBlock)(NSString* value, NSError* error);




////////////////////////////////////////////////////////////////////
// Interface definition
Expand Down
4 changes: 2 additions & 2 deletions EstimoteSDK/Headers/ESTBeaconManager.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// ESTBeaconManager.h
// EstimoteSDK7
// EstimoteSDK
//
// Version : 1.0.0
// Version : 1.1.0
// Created by Marcin Klimek on 9/18/13.
// Copyright (c) 2013 Estimote. All rights reserved.
//
Expand Down
4 changes: 2 additions & 2 deletions EstimoteSDK/Headers/ESTBeaconRegion.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// ESTBeaconRegion.h
// EstimoteSDK7
// EstimoteSDK
//
// Version : 1.0.0
// Version : 1.1.0
// Created by Marcin Klimek on 9/21/13.
// Copyright (c) 2013 Estimote. All rights reserved.
//
Expand Down
17 changes: 17 additions & 0 deletions EstimoteSDK/Headers/ESTBeaconUpdateInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ESTBeaconUpdateInfo.h
// EstimoteSDK
//
// Version : 1.1.0
// Created by Marcin Klimek on 27/11/13.
// Copyright (c) 2013 Estimote. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ESTBeaconUpdateInfo : NSObject

@property (nonatomic, strong) NSString* currentFirmwareVersion;
@property (nonatomic, strong) NSArray* supportedHardware;

@end
Binary file added EstimoteSDK/libEstimoteSDK.a
Binary file not shown.
Binary file removed EstimoteSDK/libEstimoteSDK7.a
Binary file not shown.
8 changes: 6 additions & 2 deletions NotificationDemo/NotificationDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
2F0CE7A2184CB0E5000E8805 /* libEstimoteSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F0CE7A1184CB0E5000E8805 /* libEstimoteSDK.a */; };
2FC6D35B17F42167007D8573 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D35A17F42167007D8573 /* Foundation.framework */; };
2FC6D35D17F42167007D8573 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D35C17F42167007D8573 /* CoreGraphics.framework */; };
2FC6D35F17F42167007D8573 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D35E17F42167007D8573 /* UIKit.framework */; };
Expand All @@ -24,7 +25,6 @@
2FC6D4B217F42E37007D8573 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4B117F42E37007D8573 /* SystemConfiguration.framework */; };
2FC6D4B417F42E3C007D8573 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4B317F42E3C007D8573 /* CoreBluetooth.framework */; };
2FC6D4B617F42E43007D8573 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4B517F42E43007D8573 /* CoreLocation.framework */; };
2FC6D4B817F42E4F007D8573 /* libEstimoteSDK7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4B717F42E4F007D8573 /* libEstimoteSDK7.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -38,6 +38,7 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2F0CE7A1184CB0E5000E8805 /* libEstimoteSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libEstimoteSDK.a; path = ../EstimoteSDK/libEstimoteSDK.a; sourceTree = "<group>"; };
2FC6D35717F42167007D8573 /* NotificationDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NotificationDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
2FC6D35A17F42167007D8573 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
2FC6D35C17F42167007D8573 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -68,7 +69,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2FC6D4B817F42E4F007D8573 /* libEstimoteSDK7.a in Frameworks */,
2F0CE7A2184CB0E5000E8805 /* libEstimoteSDK.a in Frameworks */,
2FC6D4B617F42E43007D8573 /* CoreLocation.framework in Frameworks */,
2FC6D4B417F42E3C007D8573 /* CoreBluetooth.framework in Frameworks */,
2FC6D4B217F42E37007D8573 /* SystemConfiguration.framework in Frameworks */,
Expand Down Expand Up @@ -113,6 +114,7 @@
2FC6D35917F42167007D8573 /* Frameworks */ = {
isa = PBXGroup;
children = (
2F0CE7A1184CB0E5000E8805 /* libEstimoteSDK.a */,
2FC6D4B717F42E4F007D8573 /* libEstimoteSDK7.a */,
2FC6D4B517F42E43007D8573 /* CoreLocation.framework */,
2FC6D4B317F42E3C007D8573 /* CoreBluetooth.framework */,
Expand Down Expand Up @@ -416,6 +418,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../EstimoteSDK",
"/Users/mklimek/Projects/estimote/ios_code/iOS-SDK/EstimoteSDK",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -439,6 +442,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../EstimoteSDK",
"/Users/mklimek/Projects/estimote/ios_code/iOS-SDK/EstimoteSDK",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
Expand Down
6 changes: 4 additions & 2 deletions ProximityDemo/ProximityDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
2F0CE7A0184CB0C2000E8805 /* libEstimoteSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F0CE79F184CB0C2000E8805 /* libEstimoteSDK.a */; };
2FC6D3E617F421D2007D8573 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D3E517F421D2007D8573 /* Foundation.framework */; };
2FC6D3E817F421D2007D8573 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D3E717F421D2007D8573 /* CoreGraphics.framework */; };
2FC6D3EA17F421D2007D8573 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D3E917F421D2007D8573 /* UIKit.framework */; };
Expand All @@ -24,7 +25,6 @@
2FC6D4C317F43606007D8573 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4C217F43606007D8573 /* SystemConfiguration.framework */; };
2FC6D4C517F4360A007D8573 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4C417F4360A007D8573 /* CoreLocation.framework */; };
2FC6D4C717F43610007D8573 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4C617F43610007D8573 /* CoreBluetooth.framework */; };
2FC6D4C917F43617007D8573 /* libEstimoteSDK7.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FC6D4C817F43617007D8573 /* libEstimoteSDK7.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -38,6 +38,7 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2F0CE79F184CB0C2000E8805 /* libEstimoteSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libEstimoteSDK.a; path = ../EstimoteSDK/libEstimoteSDK.a; sourceTree = "<group>"; };
2FC6D3E217F421D2007D8573 /* ProximityDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProximityDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
2FC6D3E517F421D2007D8573 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
2FC6D3E717F421D2007D8573 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -68,7 +69,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2FC6D4C917F43617007D8573 /* libEstimoteSDK7.a in Frameworks */,
2F0CE7A0184CB0C2000E8805 /* libEstimoteSDK.a in Frameworks */,
2FC6D4C717F43610007D8573 /* CoreBluetooth.framework in Frameworks */,
2FC6D4C517F4360A007D8573 /* CoreLocation.framework in Frameworks */,
2FC6D4C317F43606007D8573 /* SystemConfiguration.framework in Frameworks */,
Expand Down Expand Up @@ -113,6 +114,7 @@
2FC6D3E417F421D2007D8573 /* Frameworks */ = {
isa = PBXGroup;
children = (
2F0CE79F184CB0C2000E8805 /* libEstimoteSDK.a */,
2FC6D4C817F43617007D8573 /* libEstimoteSDK7.a */,
2FC6D4C617F43610007D8573 /* CoreBluetooth.framework */,
2FC6D4C417F4360A007D8573 /* CoreLocation.framework */,
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ Follow steps described below to install EstimoteSDK library:

4. Congratulations! You are done.

Changlog
-------

To see what has changed in recent versions of Estimote SDK, see the [CHANGELOG](https://github.com/Estimote/iOS-SDK/blob/master/CHANGELOG.md).

0 comments on commit 659c3aa

Please sign in to comment.