ESTSettingIBeaconMajor
@interface ESTSettingIBeaconMajor : ESTSettingReadWrite <NSCopying>
ESTSettingIBeaconMajor represents iBeacon major value broadcasted by the device.
-
Designated initializer. Validates provided value internally with +validationErrorForValue:.
See
+[ESTSettingIBeaconMajor validationErrorForValue:].
Declaration
Objective-C
- (instancetype _Nullable)initWithValue:(unsigned short)major;Swift
init?(value major: UInt16)Parameters
majoriBeacon Major value.
Return Value
Initialized object. Nil if validation fails.
-
Returns current value of iBeacon major setting.
Declaration
Objective-C
- (unsigned short)getValue;Swift
func getValue() -> UInt16Return Value
iBeacon major value.
-
Method allows to read value of initialized iBeacon Major setting object.
Declaration
Objective-C
- (void)readValueWithCompletion: (nonnull ESTSettingIBeaconMajorCompletionBlock)completion;Swift
func readValue(completion: @escaping ESTSettingIBeaconMajorCompletionBlock)Parameters
completionBlock should be invoked when operation is complete.
-
Method allows to create write operation from already initialized iBeacon Major setting object. Value provided during initialization will be used as a desired value.
Declaration
Objective-C
- (void)writeValue:(unsigned short)value completion:(nonnull ESTSettingIBeaconMajorCompletionBlock)completion;Swift
func writeValue(_ value: UInt16, completion: @escaping ESTSettingIBeaconMajorCompletionBlock)Parameters
completionBlock should be invoked when operation is complete.
-
Method checks if provided value is allowed. Returns nil if validation passes.
Declaration
Objective-C
+ (NSError *_Nullable)validationErrorForValue:(unsigned short)major;Swift
class func validationError(forValue major: UInt16) -> Error?Parameters
majorMajor value.
Return Value
Error object describing why validation failed. Nil if validation passes.
View on GitHub
ESTSettingIBeaconMajor Class Reference