Skip to content

Instantly share code, notes, and snippets.

@edopelawi
Last active May 21, 2016 15:04
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 edopelawi/0aa6ed9e5e07bf51af0175372773ca8a to your computer and use it in GitHub Desktop.
Save edopelawi/0aa6ed9e5e07bf51af0175372773ca8a to your computer and use it in GitHub Desktop.
A sample function that returns a NSString out of NSDictionary.
/// Will return @p NSString representation of user's token from passed @p payload, or @p nil if there's no user token in it.
- (NSString *)userTokenFromJSON:(NSDictionary *)json
{
return json["user_token"];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment