ESTStorageManager

@interface ESTStorageManager : NSObject

ESTStorageManager class is responsible for managing Location Beacon’s non-volatile storage.

  • Dictionary of data stored in Estimote Storage.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSDictionary *_Nonnull storageDictionary;

    Swift

    var storageDictionary: [AnyHashable : Any] { get }
  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithDeviceIdentifier:(nonnull NSString *)deviceIdentifier
                      peripheral:(nonnull ESTPeripheralTypeUtility *)peripheral;

    Swift

    init(deviceIdentifier: String, peripheral: ESTPeripheralTypeUtility)

    Parameters

    deviceIdentifier

    Identifier of device

    peripheral

    ESTPeripheralTypeUtility object of device

    Return Value

    Initilized ESTStorageManager object with empty storageDictionary property.

  • Method for reading storageDictionary from Estimote Storage. Authorized conenction is optional.

    Declaration

    Objective-C

    - (void)readStorageDictionaryWithCompletion:
        (nonnull ESTDictionaryCompletionBlock)completion;

    Swift

    func readStorageDictionary(completion: @escaping ESTDictionaryCompletionBlock)

    Parameters

    completion

    Completion block with Estimote Storage current dictionary content.

  • Method for overwriting storageDictionary. Authorized connection required.

    Declaration

    Objective-C

    - (void)saveStorageDictionary:(nonnull NSDictionary *)dictionary
                   withCompletion:(nonnull ESTCompletionBlock)completion;

    Swift

    func saveStorageDictionary(_ dictionary: [AnyHashable : Any], withCompletion completion: @escaping ESTCompletionBlock)

    Parameters

    dictionary

    NSDictionary object that will overwrite storageDictionary.

    completion

    Completion block returning NSError if saving to Estimote Storage would fail.