Last active
October 30, 2016 21:18
-
-
Save cjazz/c7f7c5660ebaad932506575d12aecb11 to your computer and use it in GitHub Desktop.
Helper to get Twitter app creds from Info.plist
This file contains hidden or 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
// | |
// 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