Skip to content

Instantly share code, notes, and snippets.

@helpshift
Last active December 14, 2015 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helpshift/5161194 to your computer and use it in GitHub Desktop.
Save helpshift/5161194 to your computer and use it in GitHub Desktop.
[Helpshift metadataWithBlock:^(void){
return [NSDictionary dictionaryWithObjectsAndKeys:
@"xyz", @"name",
@"xyz@abc.com", @"email",
gameObject.level, @"level",
gameObject.score, @"score",
nil];
}];
- (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
if ([[userInfo objectForKey:@"origin"] isEqualToString:@"helpshift"]) {
[[Helpshift sharedInstance] handleNotification:userInfo withController:self.viewController];
}
}
- (void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[[Helpshift sharedInstance] registerDeviceToken:deviceToken];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment