Skip to content

Instantly share code, notes, and snippets.

@g0dzill3r
Created February 3, 2016 14:36
Show Gist options
  • Save g0dzill3r/b28f8f12a5961f0af753 to your computer and use it in GitHub Desktop.
Save g0dzill3r/b28f8f12a5961f0af753 to your computer and use it in GitHub Desktop.
#import <TTKit/TTKit.h>
[[TTKit sharedInstance] initializeWithAgent:@”XXXX”]
[[TTKit sharedInstance] application:application
handleEventsForBackgroundURLSession:identifier
completionHandler:completionHandler];
[[TTKit sharedInstance] loginWithUserId:@"username" password:@"password"
success:^(TTUser *user) {
// Handle login.
} failure:^(NSError *error) {
// Handle failure.
}];
[[TTKit sharedInstance] sendMessage:message
rosterEntry:rosterEntry
lifetime:60
deleteOnRead:NO
success:nil
failure:nil
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment