NMDeviceDetail Class Reference
| Inherits from | NSObject |
| Declared in | NMDeviceDetail.h NMDeviceDetail.m |
Overview
NMDeviceDetail class is used to get the information of the device registered to push notification service of Netmera. Therefore, tags, location or custom key-value pairs of the registered device can be accessed easily. Moreover, these fields must be first set on the NMDeviceDetail object and then the device can be registered to ‘Netmera Push Service’ with these properties
Tasks
-
locationLocation of the registered device.
property -
customDictionaryCustom key-value pairs that can be used to specify the device. Default value is nil. If this value is nil when calling +registerWithDeviceDetail:completionHandler: method, existing customDictionary does not overridden. Else, existing customDictionary value is overridden with given dictionary.
property -
– deviceTokenReturns the deviceToken received from APNS (Apple Push Notification Service) while registering the device. This value is hold automatically by Netmera SDK and provide the uniqueness of the device for push notifications.
-
– getTagsReturns the tags that are set to the NMDeviceDetail object via addTag: , addTags: or overrideTagsWithNewTags: method. It DOES NOT return actual tags of the device. In order to get actual tags registered by device, use getDeviceDetailWithCompletionHandler: method.
-
– overrideTagsWithNewTags:Overrides the current tags of the device registered to ‘Netmera Push Service’ with the given tag collection.
-
– addTag:Adds a tag into the receiver NMDeviceDetail object. Using the receiver object, the device can be registered to or unregistered from ‘Netmera Push Service’ for the given tag.
-
– addTags:Adds multiple tags into the receiver NMDeviceDetail object. Using the receiver object, the device can be registered to or unregistered from ‘Netmera Push Service’ for the given tag array.
-
+ getDeviceDetailWithCompletionHandler:Fetches the detail of the device registered to ‘Netmera Push Service’ on the background thread.
Properties
customDictionary
Custom key-value pairs that can be used to specify the device. Default value is nil. If this value is nil when calling +registerWithDeviceDetail:completionHandler: method, existing customDictionary does not overridden. Else, existing customDictionary value is overridden with given dictionary.
@property (nonatomic, strong) NSMutableDictionary *customDictionaryDiscussion
Custom key-value pairs that can be used to specify the device. Default value is nil. If this value is nil when calling +registerWithDeviceDetail:completionHandler: method, existing customDictionary does not overridden. Else, existing customDictionary value is overridden with given dictionary.
Declared In
NMDeviceDetail.hlocation
Location of the registered device.
@property (nonatomic, strong) NMGeolocation *locationDiscussion
Location of the registered device.
This value refers to the last location of the device that can be stored in Netmera.
Declared In
NMDeviceDetail.hClass Methods
getDeviceDetailWithCompletionHandler:
Fetches the detail of the device registered to ‘Netmera Push Service’ on the background thread.
+ (void)getDeviceDetailWithCompletionHandler:(void ( ^ ) ( NMDeviceDetail *deviceDetail , NSError *error ))handlerParameters
- handler
The block to execute when the fetch of the device detail is completed.
Discussion
Fetches the detail of the device registered to ‘Netmera Push Service’ on the background thread.
Declared In
NMDeviceDetail.hInstance Methods
addTag:
Adds a tag into the receiver NMDeviceDetail object. Using the receiver object, the device can be registered to or unregistered from ‘Netmera Push Service’ for the given tag.
- (void)addTag:(NSString *)tagParameters
- tag
Tag which is used to register/unregister the device to/from ‘Netmera Push Service’.
Discussion
Adds a tag into the receiver NMDeviceDetail object. Using the receiver object, the device can be registered to or unregistered from ‘Netmera Push Service’ for the given tag.
This method does not register to or unregister from ‘Netmera Push Service’ for the given tag automatically. You should call registerWithDeviceDetail:completionHandler: or unregisterWithDeviceDetail:completionHandler: method of NMPushManager with the receiver NMDeviceDetail object.
Declared In
NMDeviceDetail.haddTags:
Adds multiple tags into the receiver NMDeviceDetail object. Using the receiver object, the device can be registered to or unregistered from ‘Netmera Push Service’ for the given tag array.
- (void)addTags:(NSArray *)tagsParameters
- tags
Array of the tags which are used to register/unregister the device to/from ‘Netmera Push Service’.
Discussion
Adds multiple tags into the receiver NMDeviceDetail object. Using the receiver object, the device can be registered to or unregistered from ‘Netmera Push Service’ for the given tag array.
This method does not register to or unregister from ‘Netmera Push Service’ for the given tags automatically. You should call registerWithDeviceDetail:completionHandler: or unregisterWithDeviceDetail:completionHandler: method of NMPushManager with the receiver NMDeviceDetail object.
Declared In
NMDeviceDetail.hdeviceToken
Returns the deviceToken received from APNS (Apple Push Notification Service) while registering the device. This value is hold automatically by Netmera SDK and provide the uniqueness of the device for push notifications.
- (NSString *)deviceTokenReturn Value
Token of the device retrieved from application:didRegisterForRemoteNotificationsWithDeviceToken: delegate method.
Discussion
Returns the deviceToken received from APNS (Apple Push Notification Service) while registering the device. This value is hold automatically by Netmera SDK and provide the uniqueness of the device for push notifications.
Declared In
NMDeviceDetail.hgetTags
Returns the tags that are set to the NMDeviceDetail object via addTag: , addTags: or overrideTagsWithNewTags: method. It DOES NOT return actual tags of the device. In order to get actual tags registered by device, use getDeviceDetailWithCompletionHandler: method.
- (NSArray *)getTagsDiscussion
Returns the tags that are set to the NMDeviceDetail object via addTag: , addTags: or overrideTagsWithNewTags: method. It DOES NOT return actual tags of the device. In order to get actual tags registered by device, use getDeviceDetailWithCompletionHandler: method.
Declared In
NMDeviceDetail.hoverrideTagsWithNewTags:
Overrides the current tags of the device registered to ‘Netmera Push Service’ with the given tag collection.
- (void)overrideTagsWithNewTags:(NSArray *)tagsParameters
- tags
Array of the tags which overrides the current ones of the device.
Discussion
Overrides the current tags of the device registered to ‘Netmera Push Service’ with the given tag collection.
This method should be called carefully, because once the current tags of the device is overridden, there is no turning back to old tags. This method does not register the given tags to ‘Netmera Push Service’ automatically. You should call registerWithDeviceDetail:completionHandler: method of NMPushManager with the receiver NMDeviceDetail object.
Declared In
NMDeviceDetail.h