ESTSettingEddystoneUIDNamespace
@interface ESTSettingEddystoneUIDNamespace : ESTSettingReadWrite <NSCopying>
ESTSettingEddystoneUIDNamespace represents Eddystone UID Namespace value.
-
Designated initializer. Validates provided value internally with +validationErrorForValue:.
See
+[ESTSettingEddystoneUIDNamespace validationErrorForValue:]
Declaration
Objective-C
- (instancetype _Nullable)initWithValue:(nonnull NSString *)namespaceID;
Swift
init?(value namespaceID: String)
Parameters
namespaceID
Eddystone UID Namespace value in form of a hex string.
Return Value
Initialized object. Nil if validation fails.
-
Returns current value of Eddystone UID Namespace ID in form of a hex string.
Declaration
Objective-C
- (nonnull NSString *)getValue;
Swift
func getValue() -> String
Return Value
Eddystone UID Namespace ID value.
-
Method allows to read value of initialized Eddystone UID Namespace setting object.
Declaration
Objective-C
- (void)readValueWithCompletion: (nonnull ESTSettingEddystoneUIDNamespaceCompletionBlock)completion;
Swift
func readValue(completion: @escaping ESTSettingEddystoneUIDNamespaceCompletionBlock)
Parameters
completion
Block to be invoked when operation is complete.
-
Method allows to create write operation from already initialized Eddystone UID Namespace setting object. Value provided during initialization will be used as a desired value.
Declaration
Objective-C
- (void)writeValue:(nonnull NSString *)namespaceID completion: (nonnull ESTSettingEddystoneUIDNamespaceCompletionBlock)completion;
Swift
func writeValue(_ namespaceID: String, completion: @escaping ESTSettingEddystoneUIDNamespaceCompletionBlock)
Parameters
namespaceID
Namespace hex string to be written to the device.
completion
Block to be invoked when operation is complete.
-
Helper method to convert a domain to Eddystone UID Namespace ID (hex string).
Declaration
Objective-C
+ (nonnull NSString *)namespaceHexStringForEddystoneDomain: (nonnull NSString *)domain;
Swift
class func namespaceHexString(forEddystoneDomain domain: String) -> String
Parameters
domain
Eddystone domain, i.e.
com.estimote
.Return Value
Converted Eddystone UID Namespace ID (hex string).
-
Method checks if provided value is allowed. Returns nil if validation passes.
Declaration
Objective-C
+ (NSError *_Nullable)validationErrorForValue:(nonnull NSString *)namespaceID;
Swift
class func validationError(forValue namespaceID: String) -> Error?
Parameters
namespaceID
Namespace hex string.
Return Value
Error object describing why validation failed. Nil if validation passes.