diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cd2296..1948d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,20 @@ This file documents the changes between different build versions of the `flic2lib.framework` +## flic2lib-ios 1.0.3 + +### Minor Changes + +* Changed the bluetooth connection parameters in order to achieve lower click latency on events that occur while the Flic is connected. This should not affect the Flic battery life. +* Added a property `isScanning` to FLICManager. +* Add callback `button:didUpdateNickname:` to FLICButton to let the app know when the nickname has been updated. +* Add callback `button:didUpdateBatteryVoltage:` to FLICButton to let the app know when the battryVoltage has been updated. + +### Bug Fixes + +* Fixed a bug that could cause the `scanForButtonsWithStateChangeHandler:completion:` to end up in an infinite loop if `stopScan` was called from within the completion handler. +* Changed the way that the lib syncs the nickname between different applications. + ## flic2lib-ios 1.0.2 ### Major Changes diff --git a/flic2lib.framework/Headers/FLICButton.h b/flic2lib.framework/Headers/FLICButton.h index 7c7d3b8..31cb4c7 100644 --- a/flic2lib.framework/Headers/FLICButton.h +++ b/flic2lib.framework/Headers/FLICButton.h @@ -293,6 +293,33 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)button:(FLICButton *)button didUnpairWithError:(NSError * _Nullable)error; +/*! + * @method button:didUpdateBatteryVoltage: + * + * @param button The FLICButton instance that the event originated from. + * @param voltage Float representation of the latest battery voltage sample. + * + * @discussion This callback will be sent once the Flic button updates its battery voltage with a new value. Typically this will occurs a few seconds + * after the button connects. If you show a battery indicator in you app, then this would be a good place to refresh your UI. Please + * see the description for the batteryVoltage property for more information. + * + */ +- (void)button:(FLICButton *)button didUpdateBatteryVoltage:(float)voltage; + +/*! + * @method button:didUpdateNickname: + * + * @param button The FLICButton instance that the event originated from. + * @param nickname The new nickname that was sent from the Flic. + * + * @discussion If the nickname is updated by another app (including the official Flic app), then you will get this callback letting you know that the + * name has changed. This may either be in real time (if multiple apps are connected at the same time), or a deayed event that + * occurs after the button connects (if the nickname was changed while your app was not active). If your app displays this nickname, + * then this would be a good place to refresh your UI. + * + */ +- (void)button:(FLICButton *)button didUpdateNickname:(NSString *)nickname; + @end NS_ASSUME_NONNULL_END diff --git a/flic2lib.framework/Headers/FLICEnums.h b/flic2lib.framework/Headers/FLICEnums.h index bafc8ec..90958a1 100644 --- a/flic2lib.framework/Headers/FLICEnums.h +++ b/flic2lib.framework/Headers/FLICEnums.h @@ -25,7 +25,7 @@ typedef NS_ENUM(NSInteger, FLICManagerState) */ FLICManagerStateUnknown = 0, /** - * The bluetooth connection with the system service was momentaryly lost, update imminent. + * The bluetooth connection with the system service was momentarily lost, update imminent. */ FLICManagerStateResetting, /** diff --git a/flic2lib.framework/Headers/FLICManager.h b/flic2lib.framework/Headers/FLICManager.h index 80f6ce3..ad3c2d7 100644 --- a/flic2lib.framework/Headers/FLICManager.h +++ b/flic2lib.framework/Headers/FLICManager.h @@ -51,6 +51,14 @@ NS_ASSUME_NONNULL_BEGIN */ @property(readonly) FLICManagerState state; +/*! + * @property scanning + * + * @discussion Let's you know if a scan is currently running or not. Reading this value will not affect a scan. + * + */ +@property(nonatomic, readonly) BOOL isScanning; + /*! * @method sharedManager * @@ -96,7 +104,7 @@ NS_ASSUME_NONNULL_BEGIN * * @discussion This will delete this button from the manager. After a successful call to this method you will no longer be able to communicate with the associated Flic button unless you * pair it again using the scanForButtonsWithStateChangeHandler:completionHandler:. On completion, the button will no longer be included in the manager's buttons array. - * After a successfull call to this method, you should discard of any references to that particular Flic button object. If you try to forget a button that is already forgotton, then + * After a successful call to this method, you should discard of any references to that particular Flic button object. If you try to forget a button that is already forgotten, then * you will get an error with the FLICErrorAlreadyForgotten code. * */ diff --git a/flic2lib.framework/Info.plist b/flic2lib.framework/Info.plist index 0ce5444..ea25cc8 100644 Binary files a/flic2lib.framework/Info.plist and b/flic2lib.framework/Info.plist differ diff --git a/flic2lib.framework/flic2lib b/flic2lib.framework/flic2lib index 7e9afe0..ba66ba0 100755 Binary files a/flic2lib.framework/flic2lib and b/flic2lib.framework/flic2lib differ