ARService Class Reference
Inherits from | NSObject |
Declared in | ARService.h |
Tasks
Accessing Shared Instance
-
+ sharedService
-
+ sdkVersion
Return the current version formatted as follow : “MajorVersion (MinorVersion)”
-
userId
property -
campaignsEnabled
property -
pushApiEnabled
property -
crashReportsEnabled
property -
pushNotificationEnvironment
property
Setuping the Service
-
– startServiceWithAPIKey:bundleId:
Call This method to start the whole service containing metrics and message center.
-
– startTrackerWithAPIKey:bundleId:
Call This method to start the metrics tracker only.
-
errorBlock
property -
– handleApplication:openURL:sourceApplication:
Colour Id Support
PushNotification Methods
-
– handleApplication:didFinishLaunchingWithOptions:
-
– handleApplicationDidBecomeActive:
-
– handleApplication:didRegisterForRemoteNotificationsWithDeviceToken:
-
– handleApplication:didReceiveRemoteNotification:pushNotificationDidOpenApplication:
-
didReceivePushNotificationBlock
property -
– fetchSubscribedTopicsWithCompletionBlock:
-
– fetchJSONMessageWithTopicUuid:messageUuid:completionBlock:
-
– sendPushNotificationWithTopics:localizedMessage:defaultLanguage:payload:completionBlock:
-
– sendPushNotificationWithTopics:sound:localizedMessage:defaultLanguage:payload:completionBlock:
MessageCenter Methods
-
numberOfTopics
property -
numberOfMessages
property -
numberOfUnreadMessages
Observes this property to update your unread messages badge number.
property -
numberOfUnreadMessagesChangedBlock
By implementing this block, you can manage your application badge.
property -
– viewControllerForMessageCenterWithSelectionBlock:
-
– viewControllerForMessageCenterWithSelectionBlock:customizationBlock:
-
– viewControllerForTopic:source:selectionBlock:
-
– viewControllerForTopicWithUUID:source:selectionBlock:
API Methods
-
– fetchNewMessagesWithCompletionBlock:
-
– setUserMetaData:completionBlock:
-
completionBlock
By overriding this block, you can redirect the http request calls to your own system. You’ll have to asynchronously call the completionBlock by passing your result, error and HTTP URL Response at the end of the request.
property -
requestLogEnabled
requestLogEnabled is no by default. By setting it to YES, all the HttpRequest preformed by the service will get logged in details in the console.
property
Tracker Methods
-
– registerPushDeviceToken:
-
– trackEvent:properties:
-
– trackTimedEvent:options:propertiesBlock:
returns NO if an event with the specified type has previously been registered. propertiesBlock allows to customize the properties when the tracker will stop/restart the event automatically depending on the options you specify.
-
– trackTimedEvent:options:properties:
returns NO if an event with the specified type has previously been registered
-
– trackTimedEvent:propertiesBlock:
returns NO if an event with the specified type has previously been registered. propertiesBlock allows to customize the properties when the tracker will stop/restart the event automatically depending on the options you specify.
-
– trackTimedEvent:properties:
returns NO if an event with the specified type has previously been registered
-
– stopTimedEvent:properties:
returns -1 if the event is no more registered
-
– stopTimedEvent:
returns -1 if the event is no more registered
-
– trackPaymentTransaction:product:
Properties
completionBlock
By overriding this block, you can redirect the http request calls to your own system. You’ll have to asynchronously call the completionBlock by passing your result, error and HTTP URL Response at the end of the request.
@property (nonatomic, copy) void ( ^ ) ( NSURLRequest *urlRequest , void ( ^ ) ( id result , NSHTTPURLResponse *response , NSError *error ) ) completionBlock
Declared In
ARService+API.h
didReceivePushNotificationBlock
@property (nonatomic, copy) void ( ^ ) ( ARPushNotification *notification ) didReceivePushNotificationBlock
Declared In
ARService+PushNotification.h
errorBlock
@property (nonatomic, copy) void ( ^ ) ( NSString *category , NSError *error ) errorBlock
Declared In
ARService.h
numberOfMessages
@property (nonatomic, assign, readonly) NSInteger numberOfMessages
Declared In
ARService+MessageCenter.h
numberOfTopics
@property (nonatomic, assign, readonly) NSInteger numberOfTopics
Declared In
ARService+MessageCenter.h
numberOfUnreadMessages
Observes this property to update your unread messages badge number.
@property (nonatomic, assign, readonly) NSInteger numberOfUnreadMessages
Declared In
ARService+MessageCenter.h
numberOfUnreadMessagesChangedBlock
By implementing this block, you can manage your application badge.
@property (nonatomic, copy) void ( ^ ) ( NSInteger numberOfUnreadMessages ) numberOfUnreadMessagesChangedBlock
Declared In
ARService+MessageCenter.h
pushNotificationEnvironment
@property (nonatomic, retain, readonly) NSString *pushNotificationEnvironment
Declared In
ARService.h
Class Methods
Instance Methods
fetchJSONMessageWithTopicUuid:messageUuid:completionBlock:
- (void)fetchJSONMessageWithTopicUuid:(NSString *)topicUuid messageUuid:(NSString *)messageUuid completionBlock:(void ( ^ ) ( NSDictionary *json , NSError *error ))completionBlock
Declared In
ARService+PushNotification.h
fetchNewMessagesWithCompletionBlock:
- (void)fetchNewMessagesWithCompletionBlock:(void ( ^ ) ( NSError *error ))completionBlock
Declared In
ARService+API.h
fetchSubscribedTopicsWithCompletionBlock:
- (void)fetchSubscribedTopicsWithCompletionBlock:(void ( ^ ) ( NSArray *topicNames , NSArray *topicLabels , NSError *error ))completionBlock
Declared In
ARService+PushNotification.h
handleApplication:didFinishLaunchingWithOptions:
- (void)handleApplication:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Declared In
ARService+PushNotification.h
handleApplication:didReceiveRemoteNotification:pushNotificationDidOpenApplication:
- (void)handleApplication:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo pushNotificationDidOpenApplication:(BOOL)pushNotificationDidOpenApplication
Declared In
ARService+PushNotification.h
handleApplication:didRegisterForRemoteNotificationsWithDeviceToken:
- (void)handleApplication:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)apnsToken
Declared In
ARService+PushNotification.h
handleApplication:openURL:sourceApplication:
Colour Id Support
- (BOOL)handleApplication:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication
Declared In
ARService.h
handleApplicationDidBecomeActive:
- (void)handleApplicationDidBecomeActive:(UIApplication *)application
Declared In
ARService+PushNotification.h
registerPushDeviceToken:
- (void)registerPushDeviceToken:(NSData *)token
Declared In
ARService+Tracker.h
sendPushNotificationWithTopics:localizedMessage:defaultLanguage:payload:completionBlock:
- (void)sendPushNotificationWithTopics:(NSArray *)topics localizedMessage:(NSDictionary *)localizedMessage defaultLanguage:(NSString *)defaultLanguage payload:(NSDictionary *)payload completionBlock:(void ( ^ ) ( NSInteger numberOfUsers , NSError *error ))completionBlock
Declared In
ARService+PushNotification.h
sendPushNotificationWithTopics:sound:localizedMessage:defaultLanguage:payload:completionBlock:
- (void)sendPushNotificationWithTopics:(NSArray *)topics sound:(NSString *)sound localizedMessage:(NSDictionary *)localizedMessage defaultLanguage:(NSString *)defaultLanguage payload:(NSDictionary *)payload completionBlock:(void ( ^ ) ( NSInteger numberOfUsers , NSError *error ))completionBlock
Declared In
ARService+PushNotification.h
setUserMetaData:completionBlock:
- (void)setUserMetaData:(NSDictionary *)metaData completionBlock:(void ( ^ ) ( NSError *error ))completionBlock
Declared In
ARService+API.h
startServiceWithAPIKey:bundleId:
Call This method to start the whole service containing metrics and message center.
- (void)startServiceWithAPIKey:(NSString *)apiKey bundleId:(NSString *)bundleId
Declared In
ARService.h
startTrackerWithAPIKey:bundleId:
Call This method to start the metrics tracker only.
- (void)startTrackerWithAPIKey:(NSString *)apiKey bundleId:(NSString *)bundleId
Declared In
ARService.h
stopTimedEvent:
returns -1 if the event is no more registered
- (NSTimeInterval)stopTimedEvent:(NSString *)name
Declared In
ARService+Tracker.h
stopTimedEvent:properties:
returns -1 if the event is no more registered
- (NSTimeInterval)stopTimedEvent:(NSString *)name properties:(NSDictionary *)properties
Declared In
ARService+Tracker.h
trackEvent:properties:
- (void)trackEvent:(NSString *)name properties:(NSDictionary *)properties
Declared In
ARService+Tracker.h
trackPaymentTransaction:product:
- (void)trackPaymentTransaction:(SKPaymentTransaction *)paymentTransaction product:(SKProduct *)product
Declared In
ARService+Tracker.h
trackTimedEvent:options:properties:
returns NO if an event with the specified type has previously been registered
- (BOOL)trackTimedEvent:(NSString *)name options:(ARTimedEventOptions)options properties:(NSDictionary *)properties
Declared In
ARService+Tracker.h
trackTimedEvent:options:propertiesBlock:
returns NO if an event with the specified type has previously been registered. propertiesBlock allows to customize the properties when the tracker will stop/restart the event automatically depending on the options you specify.
- (BOOL)trackTimedEvent:(NSString *)name options:(ARTimedEventOptions)options propertiesBlock:(NSDictionary *( ^ ) ( ARTimedEventState state , NSDictionary *previousProperties ))propertiesBlock
Declared In
ARService+Tracker.h
trackTimedEvent:properties:
returns NO if an event with the specified type has previously been registered
- (BOOL)trackTimedEvent:(NSString *)name properties:(NSDictionary *)properties
Declared In
ARService+Tracker.h
trackTimedEvent:propertiesBlock:
returns NO if an event with the specified type has previously been registered. propertiesBlock allows to customize the properties when the tracker will stop/restart the event automatically depending on the options you specify.
- (BOOL)trackTimedEvent:(NSString *)name propertiesBlock:(NSDictionary *( ^ ) ( ARTimedEventState state , NSDictionary *previousProperties ))propertiesBlock
Declared In
ARService+Tracker.h
viewControllerForMessageCenterWithSelectionBlock:
- (UIViewController *)viewControllerForMessageCenterWithSelectionBlock:(void ( ^ ) ( UIViewController *messageCenter , id topic ))selectionBlock
Declared In
ARService+MessageCenter.h
viewControllerForMessageCenterWithSelectionBlock:customizationBlock:
- (UIViewController *)viewControllerForMessageCenterWithSelectionBlock:(void ( ^ ) ( UIViewController *messageCenter , id topic ))selectionBlock customizationBlock:(void ( ^ ) ( UIViewController *messageCenter , UITableView *tableView ))customizationBlock
Declared In
ARService+MessageCenter.h