Manos Chorianopoulos

fix initialize error

......@@ -289,11 +289,27 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
- (NSDictionary *) provideInfoForCampaign {
NSMutableDictionary* info = [[NSMutableDictionary alloc] init];
// info[@"web_id"] = [Warply sharedService].webId;
info[@"web_id"] = [WLKeychain getStringForKey:@"NBWebID"];
@try {
info[@"app_uuid"] = [WLKeychain getStringForKey:@"NBAPPUuid"];
// info[@"api_key"] = self.warply.apiKey;
info[@"api_key"] = [WLKeychain getStringForKey:@"NBAPIKey"];
info[@"web_id"] = [WLKeychain getStringForKey:@"NBWebID"];
}
@catch (NSException *exception) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
info[@"app_uuid"] = [defaults stringForKey:@"NBAPPUuidUD"];
info[@"api_key"] = [defaults stringForKey:@"NBAPIKeyUD"];
info[@"web_id"] = [defaults stringForKey:@"NBWebIDUD"];
}
@finally {
// NSLog(@"Finally condition");
}
// info[@"web_id"] = [Warply sharedService].webId;
// info[@"web_id"] = [WLKeychain getStringForKey:@"NBWebID"];
// info[@"app_uuid"] = [WLKeychain getStringForKey:@"NBAPPUuid"];
// info[@"api_key"] = self.warply.apiKey;
// info[@"api_key"] = [WLKeychain getStringForKey:@"NBAPIKey"];
Warply* warplyInstance = [[Warply alloc] init];
info[@"access_token"] = [warplyInstance getAccessToken];
info[@"refresh_token"] = [warplyInstance getRefreshToken];
......