Showing
2 changed files
with
19 additions
and
3 deletions
... | @@ -289,11 +289,27 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; | ... | @@ -289,11 +289,27 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; |
289 | 289 | ||
290 | - (NSDictionary *) provideInfoForCampaign { | 290 | - (NSDictionary *) provideInfoForCampaign { |
291 | NSMutableDictionary* info = [[NSMutableDictionary alloc] init]; | 291 | NSMutableDictionary* info = [[NSMutableDictionary alloc] init]; |
292 | + | ||
293 | + @try { | ||
294 | + info[@"app_uuid"] = [WLKeychain getStringForKey:@"NBAPPUuid"]; | ||
295 | + info[@"api_key"] = [WLKeychain getStringForKey:@"NBAPIKey"]; | ||
296 | + info[@"web_id"] = [WLKeychain getStringForKey:@"NBWebID"]; | ||
297 | + } | ||
298 | + @catch (NSException *exception) { | ||
299 | + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | ||
300 | + info[@"app_uuid"] = [defaults stringForKey:@"NBAPPUuidUD"]; | ||
301 | + info[@"api_key"] = [defaults stringForKey:@"NBAPIKeyUD"]; | ||
302 | + info[@"web_id"] = [defaults stringForKey:@"NBWebIDUD"]; | ||
303 | + } | ||
304 | + @finally { | ||
305 | +// NSLog(@"Finally condition"); | ||
306 | + } | ||
307 | + | ||
292 | // info[@"web_id"] = [Warply sharedService].webId; | 308 | // info[@"web_id"] = [Warply sharedService].webId; |
293 | - info[@"web_id"] = [WLKeychain getStringForKey:@"NBWebID"]; | 309 | +// info[@"web_id"] = [WLKeychain getStringForKey:@"NBWebID"]; |
294 | - info[@"app_uuid"] = [WLKeychain getStringForKey:@"NBAPPUuid"]; | 310 | +// info[@"app_uuid"] = [WLKeychain getStringForKey:@"NBAPPUuid"]; |
295 | // info[@"api_key"] = self.warply.apiKey; | 311 | // info[@"api_key"] = self.warply.apiKey; |
296 | - info[@"api_key"] = [WLKeychain getStringForKey:@"NBAPIKey"]; | 312 | +// info[@"api_key"] = [WLKeychain getStringForKey:@"NBAPIKey"]; |
297 | Warply* warplyInstance = [[Warply alloc] init]; | 313 | Warply* warplyInstance = [[Warply alloc] init]; |
298 | info[@"access_token"] = [warplyInstance getAccessToken]; | 314 | info[@"access_token"] = [warplyInstance getAccessToken]; |
299 | info[@"refresh_token"] = [warplyInstance getRefreshToken]; | 315 | info[@"refresh_token"] = [warplyInstance getRefreshToken]; | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment