Using SDK v3.0.22 I have an issue after invoking loginWithFacebookSDK that gives back a valid BackandlessUser instance if I try to access
[[[Backendless sharedInstance] userService] currentUser] it crashes with an untraceable exception. Also if I try to log out [[[Backendless sharedInstance] userService] logout]. It happens only after logging in: if I quit the app and start up again (stayLoggedin is YES) it works normally.
Does not happen with twitter and email login.
Tried with sdk v3.0.20 and v3.0.21. Facebook sdk version 4.11.0 and 4.12.0 too.
See screenshot for exception.
Here’s the code to logout:
[[[Backendless sharedInstance] userService] logout:^(id object) {
_currentUser = nil;
_loggedInWithFacebook = NO;
if (completion) {
completion();
}
} error:^(Fault *fault) {
_currentUser = nil;
_loggedInWithFacebook = NO;
if (completion) {
completion();
}
}];
Adam,
I am sorry, I re-read this a couple of times and I am struggling to understand when exactly the error happens.
Using SDK v3.0.22 I have an issue after invoking loginWithFacebookSDK that gives back a valid BackandlessUser instance if I try to access
[[[Backendless sharedInstance] userService] currentUser] it crashes with an untraceable exception. Also if I try to log out [[[Backendless sharedInstance] userService] logout]. It happens only after logging in: if I quit the app and start up again (stayLoggedin is YES) it works normally.
Could you please describe it in a step-by-step type of description?
- do X
- do Y
- experience the error…
- Login in with Facebook using
[[[Backendless sharedInstance] userService] loginWithFacebookSDK
- Try invoking BackendlessUser *bUser = [[[Backendless sharedInstance] userService] currentUser];
- Crash
Additionally,
In AppDelegate method - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
when I invoke
if ([[[Backendless sharedInstance] userService] handleOpenURL:url]) {}
I get this
-canOpenURL: failed for URL: “fbauth2:/” - error: “(null)”
Hi Adam,
This issue is fixed, please update the latest Backendless SDK from CocoaPods (3.0.23 release) or from github.
Regards,
Slava
Yay, working like a charm! thank you so much! 