lavteam
(LavTeam)
August 18, 2017, 9:53am
1
backendless.userService.login(withFacebookSDK: accessToken?.userID, tokenString: accessToken?.tokenString, expirationDate: accessToken?.expirationDate, fieldsMapping:["email": "email"], response: { (user) in
// Запоминаем пользователя
backendless.userService.setStayLoggedIn(true)
self.goToMainVC()
}, error: { (fault) in
let alertController = UIAlertController(title: "Login failed", message: fault?.message!, preferredStyle: .alert)
let action = UIAlertAction(title: "failed", style: .destructive, handler: nil)
alertController.addAction(action)
self.present(alertController, animated: true, completion: nil)
})
in simulator (xcode) all good. Work!
in real iphone 5s and iphone se
Optional(“1343073079143108”)
Optional(2017-10-17 06:39:56 +0000)
Optional(“EAATFhJ******aAkucMGR7nFwZDZD”)
2017-08-18 12:46:48.870352+0300 decisionmaker[8821:3040859] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[NSDictionary initWithDictionary:copyItems:]: dictionary argument is not an NSDictionary’
*** First throw call stack:
(0x192846fe0 0x1912a8538 0x19276c7a0 0x1001353e8 0x1000f442c 0x1000f09f8 0x100124bcc 0x1000f265c 0x101039a50 0x101039a10 0x10103eb78 0x1927f50c8 0x1927f2ce4 0x192722da4 0x19418d074 0x1989ddc9c 0x1000d3c68 0x19173159c)
libc++abi.dylib: terminating with uncaught exception of type NSException
used:
SDK 4.0.3
SDK 4.0.6
На реальном устройстве возникает ошибка и не могу авторизоваться.
На симуляторе - ошибок нет.
Пользователя удалял из Базы Данных - не помогает.
How do I fix the error?
lavteam
(LavTeam)
August 18, 2017, 11:29am
2
With Google too
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2017-08-18 14:28:32.052187+0300 decisionmaker[3830:1415224] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[NSDictionary initWithDictionary:copyItems:]: dictionary argument is not an NSDictionary’
*** First throw call stack:
(0x186c72fe0 0x1856d4538 0x186b987a0 0x1000b5388 0x1000743cc 0x100070998 0x1000a4b6c 0x1000725fc 0x100fc5a50 0x100fc5a10 0x100fcab78 0x186c210c8 0x186c1ece4 0x186b4eda4 0x1885b8074 0x18ce09058 0x100053ae4 0x185b5d59c)
libc++abi.dylib: terminating with uncaught exception of type NSException
lavteam
(LavTeam)
August 18, 2017, 11:42am
3
Sorry, that’s my fault
I did the initialization
backendless.initApp(APPLICATION_ID, apiKey: API_KEY)
after
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
GGLContext.sharedInstance().configureWithError(&configureError)
GIDSignIn.sharedInstance().delegate = self
Hello,
you can look at the the codegen sample (see the attached screenshots) - I’ve just checked and everything works fine both for the simulator and the real devices (5s, 6s).
Regards, Olga
lavteam
(LavTeam)
August 19, 2017, 1:04pm
5
Sorry, no solved((((
https://youtu.be/Y99JixfbQHw
I recorded the video with an error.
Facebook and Google do not cause a mistake.
If I use:
backendless.data.mapTable(toClass: “Questions”, type: MyQuestions.ofClass())
backendless.persistenceService.mapTable(toClass: “Users”, type: MyUser.ofClass())
Then an error
2017-08-19 16:14:12.409 decisionmaker[30106:1211666] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSDictionary initWithDictionary:copyItems:]: dictionary argument is not an NSDictionary'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ef99b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001107d1141 objc_exception_throw + 48
2 CoreFoundation 0x000000010ef18bce -[NSDictionary initWithDictionary:copyItems:] + 798
3 decisionmaker 0x000000010e18392e -[HashMap initWithNode:] + 102
4 decisionmaker 0x000000010e145b6e -[BackendlessUser initWithProperties:] + 102
5 decisionmaker 0x000000010e1422ec -[UserService onLogin:] + 166
6 decisionmaker 0x000000010e173fd6 -[Responder responseHandler:] + 141
7 decisionmaker 0x000000010e143ed5 -[HttpEngine processAsyncAMFResponse:] + 1495
8 libdispatch.dylib 0x00000001135fe4a6 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x000000011362705c _dispatch_client_callout + 8
10 libdispatch.dylib 0x000000011360840b _dispatch_main_queue_callback_4CF + 411
11 CoreFoundation 0x000000010ef5e909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
12 CoreFoundation 0x000000010ef24ae4 __CFRunLoopRun + 2164
13 CoreFoundation 0x000000010ef24016 CFRunLoopRunSpecific + 406
14 GraphicsServices 0x0000000114ca9a24 GSEventRunModal + 62
15 UIKit 0x000000011138c134 UIApplicationMain + 159
16 decisionmaker 0x000000010e124c47 main + 55
17 libdyld.dylib 0x000000011367365d start + 1
18 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
If I do not use, then there is no error