MFBeacon Class Reference
Inherits from | NSObject |
---|---|
Declared in | MFBeacon.h MFBeacon.m |
Overview
MFBeacon
is a custom class that contains specific properties and functions that handle beacon object.
name
Specifies the name of MFBeacon
object.
@property (strong, nonatomic, nullable) NSString *name
Declared In
MFBeacon.h
proximityUUID
Specifies the proximity UUID of MFBeacon
object. It represent to company identifier of a beacon.
@property (strong, nonatomic, nullable) NSUUID *proximityUUID
Declared In
MFBeacon.h
major
Specifies the major number of MFBeacon
object. It represent the major identifier of a beacon.
@property (strong, nonatomic, nullable) NSNumber *major
Declared In
MFBeacon.h
minor
Specifies the minor number of MFBeacon
object. It represent the minor identifier of a beacon.
@property (strong, nonatomic, nullable) NSNumber *minor
Declared In
MFBeacon.h
data
Specifies the custom NSDictionary
data of MFBeacon
.
@property (strong, nonatomic, readonly, nullable) NSDictionary *data
Declared In
MFBeacon.h
+ beaconWithName:NS_SWIFT_NAME:
Creates a new MFBeacon
with a name.
+ (nonnull instancetype)beaconWithName:(nonnull NSString *)name NS_SWIFT_NAME
Parameters
name |
A name can be any alphanumeric string that begins with a letter. It represents a unique name for your beacon, like ‘Beacon Front Door’ or ‘Beacon No. 123’. |
---|
Return Value
the object beacon that is instantiated with the given name.
Declared In
MFBeacon.h
+ beaconWithObjectId:NS_SWIFT_NAME:
Creates a reference to an existing MFBeacon
for use in creating associations between MFBeacons.
+ (nonnull instancetype)beaconWithObjectId:(nonnull NSString *)objectId NS_SWIFT_NAME
Parameters
objectId |
The object id for the referenced |
---|
Return Value
A MFBeacon
instance without data.
Discussion
Warning: You need to call MFBeacon.
fetchAsyncWithBlock: to fetch object from Mesosfer cloud.
Declared In
MFBeacon.h
– dictionary
Gets all key and value pair of MFBeacon
object in a dictionary.
- (nullable NSDictionary *)dictionary
Return Value
The dictionary of all key and value pair object.
Declared In
MFBeacon.h
– objectForKey:
Returns the value associated with a given key.
- (nullable id)objectForKey:(nonnull NSString *)key
Parameters
key |
The key for which to return the corresponding value. |
---|
See Also
Declared In
MFBeacon.h
– objectForKeyedSubscript:
Returns the value associated with a given key.
- (nullable id)objectForKeyedSubscript:(nonnull NSString *)key
Parameters
key |
The key for which to return the corresponding value. |
---|
Discussion
This method enables usage of literal syntax on MFBeacon
. E.g. NSString *value = beacon[@"key"];
See Also
Declared In
MFBeacon.h
– removeObjectForKey:
Unsets a key on the object.
- (void)removeObjectForKey:(nonnull NSString *)key
Parameters
key |
The key. |
---|
Declared In
MFBeacon.h
– setObject:forKey:
Sets the object associated with a given key.
- (void)setObject:(nonnull id)object forKey:(nonnull NSString *)key
Parameters
object |
The object for |
---|---|
key |
The key for |
See Also
Declared In
MFBeacon.h
– setObject:forKeyedSubscript:
Returns the value associated with a given key.
- (void)setObject:(nonnull id)object forKeyedSubscript:(nonnull NSString *)key
Parameters
object |
The object for |
---|---|
key |
The key for |
Discussion
This method enables usage of literal syntax on MFBeacon
. E.g. beacon[@"key"] = @"value";
See Also
Declared In
MFBeacon.h
– fetchAsyncWithBlock:
Fetch the current MFBeacon
data from Mesosfer cloud asynchronously and executes the given callback block.
- (void)fetchAsyncWithBlock:(nullable MFObjectResultBlock)block
Parameters
block |
The block to execute. It shoud have the following argument signature: |
---|
Declared In
MFBeacon.h
– saveAsyncWithBlock:
Saves the MFBeacon
asynchronously and executes the given callback block.
- (void)saveAsyncWithBlock:(nullable MFBooleanResultBlock)block
Parameters
block |
The block to execute. It should have the following argument signature: |
---|
Declared In
MFBeacon.h
– deleteAsyncWithBlock:
Delete the MFBeacon
object in Mesosfer cloud asynchronously and executes the given callback block.
- (void)deleteAsyncWithBlock:(nullable MFBooleanResultBlock)block
Parameters
block |
The block to execute. It should have the following argument signature: |
---|
Declared In
MFBeacon.h