Skip to content

Instantly share code, notes, and snippets.

@cjazz
Last active October 30, 2016 21:18
Show Gist options
  • Save cjazz/c7f7c5660ebaad932506575d12aecb11 to your computer and use it in GitHub Desktop.
Save cjazz/c7f7c5660ebaad932506575d12aecb11 to your computer and use it in GitHub Desktop.
Helper to get Twitter app creds from Info.plist
//
// TwitterAPIBundle.m
//
// Created by Adam Chin on 10/26/15.
//
#import "TwitterAPIBundle.h"
static NSString * const TwitterAPIKey = @"TwitterAPIKey";
static NSString * const TwitterSecret = @"TwitterSecret";
@interface TwitterAPIBundle ()
@end
@implementation TwitterAPIBundle
+(NSDictionary *)readInfoPlist {
NSDictionary *info = [[NSBundle mainBundle] infoDictionary];
return info;
}
+(NSString *)twitterAPIKey {
NSString *tKey = [[TwitterAPIBundle readInfoPlist] objectForKey:@"TwitterAPIKey"];
return tKey;
}
+(NSString *)twitterSec{
NSString *tSec = [[TwitterAPIBundle readInfoPlist] objectForKey:@"TwitterSecret"];
return tSec;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment