|
26 | 26 | static NSString * const BRANCH_PREFS_KEY_LAST_RUN_BRANCH_KEY = @"bnc_last_run_branch_key"; |
27 | 27 | static NSString * const BRANCH_PREFS_KEY_LAST_STRONG_MATCH_DATE = @"bnc_strong_match_created_date"; |
28 | 28 |
|
29 | | -static NSString * const BRANCH_PREFS_KEY_CUSTOM_API_URL = @"bnc_custom_api_url"; |
30 | 29 | static NSString * const BRANCH_PREFS_KEY_PATTERN_LIST_URL = @"bnc_pattern_list_url"; |
31 | 30 |
|
32 | 31 | static NSString * const BRANCH_PREFS_KEY_RANDOMIZED_DEVICE_TOKEN = @"bnc_randomized_device_token"; |
@@ -68,7 +67,6 @@ @interface BNCPreferenceHelper () { |
68 | 67 | NSOperationQueue *_persistPrefsQueue; |
69 | 68 | NSString *_lastSystemBuildVersion; |
70 | 69 | NSString *_browserUserAgentString; |
71 | | - NSString *_branchAPIURL; |
72 | 70 | NSString *_referringURL; |
73 | 71 | } |
74 | 72 |
|
@@ -156,33 +154,6 @@ - (void) dealloc { |
156 | 154 |
|
157 | 155 | #pragma mark - API methods |
158 | 156 |
|
159 | | -- (void)setBranchAPIURL:(NSString *)url { |
160 | | - if ([url hasPrefix:@"http://"] || [url hasPrefix:@"https://"] ){ |
161 | | - @synchronized (self) { |
162 | | - _branchAPIURL = [url copy]; |
163 | | - [self writeObjectToDefaults:BRANCH_PREFS_KEY_CUSTOM_API_URL value:_branchAPIURL]; |
164 | | - } |
165 | | - } else { |
166 | | - BNCLogWarning(@"Ignoring invalid custom API URL"); |
167 | | - } |
168 | | -} |
169 | | - |
170 | | -- (NSString *)branchAPIURL { |
171 | | - @synchronized (self) { |
172 | | - if (!_branchAPIURL) { |
173 | | - _branchAPIURL = [self readStringFromDefaults:BRANCH_PREFS_KEY_CUSTOM_API_URL]; |
174 | | - } |
175 | | - |
176 | | - // return the default URL in the event there's nothing in storage |
177 | | - if (_branchAPIURL == nil || [_branchAPIURL isEqualToString:@""]) { |
178 | | - _branchAPIURL = [BNC_API_URL copy]; |
179 | | - [self writeObjectToDefaults:BRANCH_PREFS_KEY_CUSTOM_API_URL value:_branchAPIURL]; |
180 | | - } |
181 | | - |
182 | | - return _branchAPIURL; |
183 | | - } |
184 | | -} |
185 | | - |
186 | 157 | - (void)setPatternListURL:(NSString *)url { |
187 | 158 | if ([url hasPrefix:@"http://"] || [url hasPrefix:@"https://"] ){ |
188 | 159 | @synchronized (self) { |
|
0 commit comments