Hi,
Please helpme, i can´t to use "userService authenticateUser"
When try to execute this function its generated next exception:
-----------------------------------------------------------------------------------------------------------------
App42Trace: -[App42Service populateSignParams].....IN
App42Trace: UTCTimeStamp=2015-09-11T16:54:41.475Z
App42Trace: -[App42Service populateSignParams].....OUT
App42Trace: -[App42Service populateMetaHeaderParams].....IN
App42Trace: InstallationId=57252f262b036527473e437354e4c474
App42Trace: -[App42Service populateMetaHeaderParams].....OUT
App42Trace: MetaHeaders={
SDKName = iOS;
deviceId = 57252f262b036527473e437354e4c474;
}
App42Trace: headerParams={
SDKName = iOS;
apiKey = e60380295fd6af383179eefd228c5cd775ea7ebf35f7b66201ce1fe644dce730;
deviceId = 57252f262b036527473e437354e4c474;
signature = "hqheNIpfW82z5cCkqjDsgtvISsk%3D";
timeStamp = "2015-09-11T16:54:41.475Z";
version = "1.0";
}
App42Trace: queryParams={
}
2015-09-11 11:54:41.506 FlashWay[3540:999745] -[ViewController loginclick:]: unrecognized selector sent to instance 0x15dd0dc30
2015-09-11 11:54:41.508 FlashWay[3540:999745] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController loginclick:]: unrecognized selector sent to instance 0x15dd0dc30'
*** First throw call stack:
(0x18531c22c 0x196c780e4 0x1853232f4 0x1853200a8 0x18522296c 0x189dcd1ec 0x189db62c8 0x189dccb88 0x189dcc814 0x189dc5d50 0x189d98f74 0x18a03a124 0x189d97488 0x1852d3f8c 0x1852d3230 0x1852d12e0 0x1851fcf74 0x18eb076fc 0x189dfed94 0x10001bcac 0x197322a08)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
-----------------------------------------------------------------------------------------------------------------
The code that i am executing is: (the API its already initilized)
UserService *userService = [App42API buildUserService];
NSString *userName = _tfUserName.text;
NSString *passwd = _tfPassword.text;
[userService authenticateUser:userName password:passwd completionBlock:^(BOOL success, id responseObj, App42Exception *exception) {
if (success) {
User *user = (User*)responseObj;
NSLog(@"userName is %@" , user.userName);
NSLog(@"sessionId is %@" , user.sessionId);
_alert.message = @"Has iniciado sesión!";
[_alert show];
} else {
NSLog(@"Exception is %@",[exception reason]);
NSLog(@"HTTP error Code is %d",[exception httpErrorCode]);
NSLog(@"App Error Code is %d",[exception appErrorCode]);
NSLog(@"User Info is %@",[exception userInfo]);
_alert.message = @"Error %@",[exception reason];
[_alert show];
}
}];
The API initialization its ok because the next function work correctly into app:
-
userService createUserWithProfile
-
uploadService uploadFile
-
storageService insertJSONDocument
Thanks for your help