Created
February 3, 2016 14:36
-
-
Save g0dzill3r/b28f8f12a5961f0af753 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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