forked from ChatSecure/ChatSecure-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOTRSecrets.m
40 lines (32 loc) · 1.11 KB
/
OTRSecrets.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// OTRSecrets.m
// Off the Record
//
// Created by Chris Ballinger on 12/9/11.
// Copyright (c) 2012 Chris Ballinger. All rights reserved.
//
#import "OTRSecrets.h"
@import Foundation;
#import "OTRAssets.h"
static NSString *const kOTRGoogleAppSecret = @"kOTRGoogleAppSecret";
static NSString *const kOTRHockeyLiveIdentifier = @"kOTRHockeyLiveIdentifier";
static NSString *const kOTRHockeyBetaIdentifier = @"kOTRHockeyBetaIdentifier";
@implementation OTRSecrets
+ (NSString*) googleAppSecret {
return [[self defaultPlist] objectForKey:kOTRGoogleAppSecret];
}
+ (NSString*) hockeyLiveIdentifier {
return [[self defaultPlist] objectForKey:kOTRHockeyLiveIdentifier];
}
+ (NSString*) hockeyBetaIdentifier {
return [[self defaultPlist] objectForKey:kOTRHockeyBetaIdentifier];
}
+ (NSDictionary*) defaultPlist {
NSBundle *bundle = [OTRAssets resourcesBundle];
NSString *path = [bundle pathForResource:@"Secrets" ofType:@"plist"];
NSParameterAssert(path != nil);
NSDictionary *plist = [[NSDictionary alloc] initWithContentsOfFile:path];
NSParameterAssert(plist != nil);
return plist;
}
@end