KNYMessagingService Class Reference
| Inherits from | NSObject |
| Declared in | KNYMessagingService.h |
Tasks
-
– init -
+ sharedMessagingService -
– registerInBackgroundWithDeviceToken:alias:completion: -
– unregisterInBackgroundUsingCompletionBlock: -
– fetchMessageContentInBackgroundWithMessageId:completion: -
– markMessageReadInBackgroundWithMessageId:completion: -
– updateGeoLocationInBackgroundWithLatitude:longitude:locationName:completion: -
– fetchAllMessagesInBackgroundWithStartIndex:pageSize:completion: -
– setMessagingServiceEndPoint:
Class Methods
sharedMessagingService
Throws exception, when invoked before initialializing the KNYClient.
+ (instancetype)sharedMessagingServiceReturn Value
Returns the shared instance of KNYMessagingService
Discussion
Throws exception, when invoked before initialializing the KNYClient.
Declared In
KNYMessagingService.hInstance Methods
fetchAllMessagesInBackgroundWithStartIndex:pageSize:completion:
Fetch all messages
- (NSOperation *)fetchAllMessagesInBackgroundWithStartIndex:(NSUInteger)startIndex pageSize:(NSUInteger)pageSize completion:(void ( ^ ) ( NSDictionary *messages , NSError *error ))completionParameters
- startIndex
start message index
- pageSize
number of messages per page
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
Fetch all messages
Declared In
KNYMessagingService.hfetchMessageContentInBackgroundWithMessageId:completion:
Fetch complete message
- (NSOperation *)fetchMessageContentInBackgroundWithMessageId:(NSString *)messageId completion:(void ( ^ ) ( NSString *message , NSError *error ))completionParameters
- messageId
message id
- completion
The block to execute. The block should have the following argument signature: (NSString string, NSError error)
Return Value
Returns an NSOperation instance object.
Discussion
Fetch complete message
Declared In
KNYMessagingService.hmarkMessageReadInBackgroundWithMessageId:completion:
Mark message as read
- (NSOperation *)markMessageReadInBackgroundWithMessageId:(NSString *)messageId completion:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- messageId
message id
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
Mark message as read
Declared In
KNYMessagingService.hregisterInBackgroundWithDeviceToken:alias:completion:
Register for messaging
- (NSOperation *)registerInBackgroundWithDeviceToken:(NSData *)deviceToken alias:(NSString *)alias completion:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- deviceToken
device token
- alias
alias
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
Register for messaging
Declared In
KNYMessagingService.hsetMessagingServiceEndPoint:
endPoint messaging Service URL
- (void)setMessagingServiceEndPoint:(NSString *)URLStringParameters
- URLString
endPoint messaging Service URL
Declared In
KNYMessagingService.hunregisterInBackgroundUsingCompletionBlock:
Unregister from messaging
- (NSOperation *)unregisterInBackgroundUsingCompletionBlock:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
Unregister from messaging
Declared In
KNYMessagingService.hupdateGeoLocationInBackgroundWithLatitude:longitude:locationName:completion:
update geo location
- (NSOperation *)updateGeoLocationInBackgroundWithLatitude:(double)latitude longitude:(double)longitude locationName:(NSString *)locationName completion:(void ( ^ ) ( BOOL succeeded , NSError *error ))completionParameters
- latitude
latitude
- longitude
logitude
- locationName
location name
- completion
The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)
Return Value
Returns an NSOperation instance object.
Discussion
update geo location
Declared In
KNYMessagingService.h