ESTBulkUpdater

@interface ESTBulkUpdater : NSObject

Main class of the bulk updater that performs all update operations handled by objects of <ESBulkUpdaterSingleOperation> class. Updates are performed in the concurent queue and can work both in foreground and background.

To star bulk update you need to prepare array of <ESBeaconUpdateInfo> objects containg beacons and update configuration. Then just invoke startWithBeaconInfos:timeout: method of this class to start update procedure. This class defines notifications that can be used to get progress of update procedure state.

  • Array with information about beacons update status. Contains objects of ESBeaconUpdateInfo.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic)
        NSArray<ESTBeaconUpdateInfo *> *_Nullable beaconInfos;

    Swift

    var beaconInfos: [ESTBeaconUpdateInfo]? { get set }
  • Indicating what mode is bulk updater currently running.

    Declaration

    Objective-C

    @property (readonly, nonatomic) ESTBulkUpdaterMode mode;

    Swift

    var mode: ESTBulkUpdaterMode { get }
  • Status of bulk updater.

    Declaration

    Objective-C

    @property (readonly, nonatomic) ESBulkUpdaterStatus status;

    Swift

    var status: ESBulkUpdaterStatus { get }
  • ESBulkUpdater

    Declaration

    Objective-C

    + (nonnull ESTBulkUpdater *)sharedInstance;

    Swift

    class func sharedInstance() -> ESTBulkUpdater

    Return Value

    Returns singleton instance of bulk updater.

  • Verify if incoming Push Notification is related to pending settings update comming from the Estimote Cloud

    Declaration

    Objective-C

    + (BOOL)verifyPushNotificationPayload:(nonnull NSDictionary *)payload;

    Swift

    class func verifyPushNotificationPayload(_ payload: [AnyHashable : Any]) -> Bool

    Parameters

    payload

    userInfo field comming from application:didReceiveRemoteNotification:fetchCompletionHandler:

    Return Value

    result of verification

  • Starts update process based on changes applied in the cloud.

    Declaration

    Objective-C

    - (void)startWithCloudSettingsAndTimeout:(NSTimeInterval)timeout;

    Swift

    func start(withCloudSettingsAndTimeout timeout: TimeInterval)

    Parameters

    timeout

    Timeout for bulk update operation in seconds. 0 means no timeout.

  • Starts update process for given beacons and updates them accordingly to given config.

    Declaration

    Objective-C

    - (void)startWithBeaconInfos:(nonnull NSArray *)beaconInfos
                         timeout:(NSTimeInterval)timeout;

    Swift

    func start(withBeaconInfos beaconInfos: [Any], timeout: TimeInterval)

    Parameters

    beaconInfos

    Array with <ESBeaconUpdateInfo> objects, defining updates for beacons.

    timeout

    Timeout for bulk update operation in seconds. 0 means no timeout.

  • Verify if beacon is currently in update process

    Declaration

    Objective-C

    - (BOOL)isUpdateInProgressForBeaconWithMacAddress:
        (nonnull NSString *)macAddress;

    Swift

    func isUpdateInProgressForBeacon(withMacAddress macAddress: String) -> Bool

    Parameters

    macAddress

    Mac Address of device to verify

    Return Value

    BOOL value indicating if beacon is waiting for update

  • Verify if beacon is currently waiting for update

    Declaration

    Objective-C

    - (BOOL)isBeaconWaitingForUpdate:(nonnull NSString *)macAddress;

    Swift

    func isBeaconWaiting(forUpdate macAddress: String) -> Bool

    Parameters

    macAddress

    Mac Address of device to verify

    Return Value

    BOOL value indicating if beacon is waiting for update

  • Get all possible infos for particular beacon

    Declaration

    Objective-C

    - (nonnull NSArray *)getBeaconUpdateInfosForBeaconWithMacAddress:
        (nonnull NSString *)macAddress;

    Swift

    func getBeaconUpdateInfosForBeacon(withMacAddress macAddress: String) -> [Any]

    Parameters

    macAddress

    Mac Address of device to get beacon infos for

    Return Value

    NSArray containing all related beacon infos

  • Returns time left to bulk update timeout

    Declaration

    Objective-C

    - (NSTimeInterval)getTimeLeftToTimeout;

    Swift

    func getTimeLeftToTimeout() -> TimeInterval
  • Cancels update process. Note that currently updating beacon will finish.

    Declaration

    Objective-C

    - (void)cancel;

    Swift

    func cancel()