Manos Chorianopoulos

add logs to get profile

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -994,12 +994,21 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
NSDictionary *postDictionary = @{@"consumer_data":@{@"action": @"handle_user_details", @"process": @"get"}};
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary options:0 error:NULL];
[self sendContext8:jsonData successBlock:^(NSDictionary *contextResponse) {
// TODO: DELETE
NSLog(@"**************** getProfile Response *****************" );
NSLog(@"%@", contextResponse );
if (success) {
success(contextResponse);
}
NSLog(@"**************** WARPLY Response *****************" );
NSLog(@"%@", contextResponse );
} failureBlock:^(NSError *error) {
// TODO: DELETE
NSLog(@"**************** getProfile error *****************" );
NSLog(@"%@", error );
if (failure) {
NSDictionary* dict = [NSDictionary alloc];
dict = [error userInfo];
......@@ -1013,6 +1022,11 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
NSLog(@"**************** WARPLY Response *****************" );
NSLog(@"%@", contextResponse );
} failureBlock:^(NSError *error) {
// TODO: DELETE
NSLog(@"**************** getProfile error 2 *****************" );
NSLog(@"%@", error );
if (failure) {
failure(error);
}
......@@ -2841,6 +2855,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
successBlock:(void (^)(NSDictionary *contextResponse))successBlock
failureBlock:(void (^)(NSError *error))failureBlock
{
// TODO: DELETE
NSLog(@"**************** getProfile sendContext8 *****************" );
BOOL appIsRegisteredWithWarply = [self isRegistrationValid];
if (WL_FEATURE_IS_DISABLED_WITH_KEY(WL_WARPLY_ENABLED))
......@@ -3369,6 +3387,10 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
successBlock:(void (^)(NSDictionary *contextResponse))successBlock
failureBlock:(void (^)(NSError *error))failureBlock
{
// TODO: DELETE
NSLog(@"**************** getProfileRequestInvocationWithType *****************" );
void (^ successBlockCopy)(void) = [successBlock copy];
void (^ failureBlockCopy)(void) = [failureBlock copy];
......@@ -4152,7 +4174,9 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
WLLOG(@"*************************************************");
NSDictionary *contextResponse=JSON;
// TODO: DELETE
NSLog(@"**************** runGetProfileRequestWithType contextResponse *****************" );
NSLog(@"%@", contextResponse );
if ([JSON objectForKey:@"status"]) {
......@@ -4181,20 +4205,45 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
if (successBlock)
{
// TODO: DELETE
NSLog(@"**************** runGetProfileRequestWithType successBlock contextResponse *****************" );
NSLog(@"%@", contextResponse );
if ([path length]!=0)
{
// TODO: DELETE
NSLog(@"**************** runGetProfileRequestWithType successBlock [contextResponse valueForKey:path] *****************" );
NSLog(@"%@", [contextResponse valueForKey:path] );
successBlock([contextResponse valueForKey:path]);
return;
}
// TODO: DELETE
NSLog(@"**************** runGetProfileRequestWithType successBlock contextResponse 2 *****************" );
NSLog(@"%@", contextResponse );
successBlock(contextResponse);
}
}else{
// TODO: DELETE
NSLog(@"**************** runGetProfileRequestWithType else *****************" );
NSLog(@"%@", contextResponse );
NSError *error = [NSError errorWithDomain:WARP_ERROR_DOMAIN code:1026 userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Empty response", @"Warply")}];
if (failureBlock)
failureBlock(error);
// TODO: DELETE
NSLog(@"**************** runGetProfileRequestWithType else error *****************" );
NSLog(@"%@", error );
}
}
......