MFNotification Class Reference
Inherits from | NSObject |
---|---|
Declared in | MFNotification.h MFNotification.m |
Overview
MFNotification
is a custom class that used for storing notification data. This is a simple representation of MFStoryline
object.
objectId
Specifies the unique id of MFNotification
object.
@property (strong, nonatomic, readonly, nullable) NSString *objectId
Discussion
This field will be assigned by fetching current object that exists or by saving new user to Mesosfer cloud.
Declared In
MFNotification.h
createdAt
Specifies the created timestamp of MFNotification
object.
@property (strong, nonatomic, readonly, nullable) NSDate *createdAt
Discussion
This field will be assigned by fetching current object that exists or by saving new user to Mesosfer cloud.
Declared In
MFNotification.h
updatedAt
Specifies the last updated timestamp of MFNotification
object.
@property (strong, nonatomic, readonly, nullable) NSDate *updatedAt
Discussion
This field will be assigned by fetching current object that exists or by saving new user to Mesosfer cloud.
Declared In
MFNotification.h
event
Specifies the beacon event of MFNotification
object.
@property (assign, nonatomic) MFBeaconEvent event
Declared In
MFNotification.h
type
Specifies the notification type of MFNotification
object.
@property (assign, nonatomic) MFNotificationType type
Declared In
MFNotification.h
notifDescription
Specifies the description of MFNotification
object.
@property (strong, nonatomic, nullable) NSString *notifDescription
Declared In
MFNotification.h
isEnabled
Specifies the state of MFNotification
object whether it is enabled or disabled.
@property (assign, nonatomic) BOOL isEnabled
Declared In
MFNotification.h
beacon
Specifies a MFBeacon
object of notification.
@property (strong, nonatomic, nullable) MFBeacon *beacon
Declared In
MFNotification.h
data
Specifies the custom NSDictionary
data of MFNotification
.
@property (strong, nonatomic, readonly, nullable) NSDictionary *data
Declared In
MFNotification.h
+ notificationWithBeacon:NS_SWIFT_NAME:
Creates a new MFNotification
with a MFNotification
object.
+ (nonnull instancetype)notificationWithBeacon:(nonnull MFBeacon *)beacon NS_SWIFT_NAME
Parameters
beacon |
A |
---|
Return Value
A MFNotification
object that is instantiated with the given MFNotification
object.
Declared In
MFNotification.h
+ notificationWithBeaconId:NS_SWIFT_NAME:
Creates a new MFNotification
with a MFNotification
objectId.
+ (nonnull instancetype)notificationWithBeaconId:(nonnull NSString *)beaconId NS_SWIFT_NAME
Parameters
beaconId |
The object id for the |
---|
Return Value
A MFNotification
object that is instantiated with the given MFNotification
objectId.
Declared In
MFNotification.h
+ notificationWithObjectId:NS_SWIFT_NAME:
Creates a reference to an existing MFNotification
for use in creating associations between MFNotifications.
+ (nonnull instancetype)notificationWithObjectId:(nonnull NSString *)objectId NS_SWIFT_NAME
Parameters
objectId |
The object id for the referenced |
---|
Return Value
A MFNotification
instance without data.
Discussion
Warning: You need to call MFNotification.
fetchAsyncWithBlock: to fetch object from Mesosfer cloud.
Declared In
MFNotification.h
– dictionary
Gets all key and value pair of MFNotification
object in a dictionary.
- (nullable NSDictionary *)dictionary
Return Value
The dictionary of all key and value pair object.
Declared In
MFNotification.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
MFNotification.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 MFNotification
. E.g. NSString *value = user[@"key"];
See Also
Declared In
MFNotification.h
– removeObjectForKey:
Unsets a key on the object.
- (void)removeObjectForKey:(nonnull NSString *)key
Parameters
key |
The key. |
---|
Declared In
MFNotification.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
MFNotification.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 MFNotification
. E.g. user[@"key"] = @"value";
See Also
Declared In
MFNotification.h
– fetchAsyncWithBlock:
Fetch the current MFNotification
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
MFNotification.h
– saveAsyncWithBlock:
Saves the MFNotification
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
MFNotification.h
– deleteAsyncWithBlock:
Delete the MFNotification
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
MFNotification.h