You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 25, 2020. It is now read-only.
Does it support Sync. process ? like calling a function that return a value from the service response and waiting the response to come back
(BOOL)checkUserExistence{
NSInteger callID;
_jsonRPCService =[[DSJSONRPC alloc] initWithServiceEndpoint:[NSURL URLWithString:@"http://serv.m-diet.com/Persons.ashx"]];
DSJSONRPCCompletionHandler completionHandler = ^(NSString *methodName, NSInteger callId, id methodResult, DSJSONRPCError *methodError, NSError *internalError) {
if (methodError) {
NSLog(@"\nMethod %@(%i) returned an error: %@\n\n", methodName, callId, methodError);
return NO;
}
else if (internalError) {
NSLog(@"\nMethod %@(%i) couldn't be sent with error: %@\n\n", methodName, callId, internalError);
return NO;
}
else {
NSLog(@"\nMethod %@(%i) completed with result: %@\n\n", methodName, callId, methodResult);
NSMutableDictionary *responceDictionary = (NSMutableDictionary *)methodResult;
return [[responceDictionary objectForKey:@"result"]boolValue];
}
};
callID = [_jsonRPCService callMethod:@"CheckPersonID" withParameters:@{ @"PersonID" : @"sam@am.com"} onCompletion:completionHandler];
}