ESTFeaturesetBackgroundMode
Deprecated
Deprecated since 4.31.0.
@interface ESTFeaturesetBackgroundMode : NSObject
ESTFeaturesetBackgroundMode encapsulates operations required for Background Mode’s functionality. The algorithm relies on Generic Adevrtiser, and this helper tool ensures that the settings are set properly.
-
Designated initializer.
Declaration
Objective-C
- (nonnull instancetype)initWithDevice: (nonnull ESTDeviceLocationBeacon *)device;
Swift
init(device: ESTDeviceLocationBeacon)
Parameters
device
Next Gen device the settings are to be applied to.
-
Perform read operations for settings related to Background Mode, decide whether they satisfy prerequisites for Background Mode and call
completion
when all are done.@discussion If all underlying operations succeed,
completion
‘sfeaturesetEnabled
tells whether Background Mode prerequisites are met,errors
is nil.If any of underlying operation fails,
completion
’sfeaturesetEnabled
is set toNO
, anderrors
array contains errors resulting from failed operations.Declaration
Objective-C
- (void)readSettingsWithCompletion: (nonnull void (^)(BOOL, NSArray<NSError *> *_Nullable))completion;
Swift
func readSettings(completion: @escaping (Bool, [Error]?) -> Void)
Parameters
completion
Completion block invoked after all operations are done (either successfully or not).
-
Write Background Mode values for settings related to EM algorithms. Call
completion
when all setting operations are done.@discussion If all underlying operations succeed,
completion
‘serrors
is nil.If any of underlying operation fails,
completion
’serrors
array contains errors resulting from failed operations.Declaration
Objective-C
- (void)writeEnableSettings:(BOOL)enabled withCompletion: (nonnull void (^)(NSArray<NSError *> *_Nullable))completion;
Swift
func writeEnableSettings(_ enabled: Bool, withCompletion completion: @escaping ([Error]?) -> Void)
Parameters
completion
Completion block invoked after all operations are done (either successfully or not).
-
Deprecated
Use +classNamesToSettingsForDeviceIdentifier: instead
Settings that were written when executing this featureset, for Estimote SDK versions <= 4.22.1. Calls +classNamesToSettingsForDeviceIdentifier: with nil.
Declaration
Objective-C
+ (nonnull NSDictionary<NSString *, ESTSettingBase *> *)classNamesToSettings;
Swift
class func classNamesToSettings() -> [String : ESTSettingBase]
Return Value
Dictionary with setting class names as keys, setting objects as values.
-
Settings written when executing this featureset. This method requires passing device identifier, because Generic Advertiser data setting value depends on it.
Declaration
Objective-C
+ (nonnull NSDictionary<NSString *, ESTSettingBase *> *) classNamesToSettingsForDeviceIdentifier: (nullable NSString *)deviceIdentifier;
Swift
class func classNamesToSettings(forDeviceIdentifier deviceIdentifier: String?) -> [String : ESTSettingBase]
Parameters
deviceIdentifier
Identifier of the device that should have the settings applied.
Return Value
Dictionary with setting class names as keys, setting objects as values.
-
Deprecated
Use +getWriteOperationsForDeviceIdentifier: instead
Write operations for this featureset, for Estimote SDK versions <= 4.22.1. Calls +classNamesToSettingsForDeviceIdentifier: with nil.
Declaration
Objective-C
+ (nonnull NSArray<id<ESTBeaconOperationProtocol>> *)getWriteOperations;
Swift
class func getWriteOperations() -> [ESTBeaconOperationProtocol]
-
An array containing write operations from given featureset. This method requires passing device identifier, because Generic Advertiser data setting value depends on it.
Declaration
Objective-C
+ (nonnull NSArray<id<ESTBeaconOperationProtocol>> *) getWriteOperationsForDeviceIdentifier:(nullable NSString *)deviceIdentifier;
Swift
class func getWriteOperations(forDeviceIdentifier deviceIdentifier: String?) -> [ESTBeaconOperationProtocol]
-
Determine whether the provided settings represent a proper configuration for Estimote Monitoring. Supports providing more settings than required specifically for the check. This method requires passing device identifier, because Generic Advertiser data setting value depends on it.
Declaration
Objective-C
+ (BOOL)featuresetEnabledForSettings: (nonnull NSArray<ESTSettingBase *> *)settingsToTest forDeviceIdentifier:(nullable NSString *)deviceIdentifier;
Swift
class func featuresetEnabled(forSettings settingsToTest: [ESTSettingBase], forDeviceIdentifier deviceIdentifier: String?) -> Bool
Parameters
settingsToTest
Array with setting objects to check.
deviceIdentifier
Identifier of the device that should have the settings applied.
Return Value
YES if the array contains all the settings required for Estimote Monitoring and the setting values are correct for Estimote Monitoring. NO if the array doesn’t contain all the settings required for Estimote Monitoring or any of the setting values is incorrect Estimote Monitoring.