Skip to content

Instantly share code, notes, and snippets.

@jamesnesfield
Last active February 15, 2016 11:37
Show Gist options
  • Save jamesnesfield/54f89cf71492e2956add to your computer and use it in GitHub Desktop.
Save jamesnesfield/54f89cf71492e2956add to your computer and use it in GitHub Desktop.
iOS Getting Started
[[ChirpSDK sdk] setOfflineOnly:YES];
[[ChirpSDK sdk] startListening:^(Chirp *chirp, NSError *error)
{
NSLog(@"Heard chirp: %@", chirp.shortcode);
}];
[[ChirpSDK sdk] chirpDictionary:@{
@"key" : @"value",
@"more" : @"data",
@"array" : @[ 1, 2, 3, ]
} withCompletion:^(Chirp *chirp, NSError *error)
{
if (!error)
NSLog(@"Chirped OK");
}];
[[ChirpSDK sdk] chirpShortcode:@"parrotbill" withCompletion:^(Chirp *chirp, NSError *error)
{
if (!error)
NSLog(@"Chirped OK.");
}];
[[ChirpSDK sdk] setAppKey:YOUR_APP_KEY
andSecret:YOUR_APP_SECRET];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment