Enabling Online Push

To consume push messages, the application developer implements a delegate method from the SDMSUPPushDelegate.h header file.

Syntax

- (void) pushNotificationReceived: (NSDictionary *) data

Examples

  • Online Push Implementation
    1. Import the header file SDMSUPPushDelegate.h in the header file of the class where you implement the push delegate. It is recommended to implement this in the App delegate.
    2. The header file should implement the protocol. This is done by including the <SDMSUPPushDelegate> key to the super class from which the current class inherits the header file.
      @interface SUPProxyClientAppDelegate : NSObject<UIApplicationDelegate, SDMSUPPushDelegate>
    3. Import the SUPUtilities.h file in the .m file of the class in which you implement the delegate.
    4. In any of the startup methods add the following code snippet:
      [SUPUtilities setDelegate:self];
    5. Implement the delegate method which receives the data in the data parameter.
      - (void) pushNotificationReceived:(NSDictionary*)data{
      NSLog(@"%@",[data objectForKey:@"Data]);
      }