FBLoginView works on iPhone Simulator, but not on actual device - ios

I have created an app that allows a user to login using facebook via the FacebookSDK. I can successfully login while running the app on the iPhone Simulator as an iPhone 5 or 5S (i haven't tried any other devices). But, when I run the app on my iPhone 5 the FBLoginView doesn't work. More specifically, when I tap the view (the 'Log In' button) the color changes to a slightly darker blue to acknowledge that the touch was received, but nothing else happens. Normally, a browser would open and request my Facebook credentials, but that does not happen.
Any ideas on what the problem might be?
FYI, I am using XCode 6 Beta 5.
Update:
I took John's advice in the comments below and uninstalled the Facebook app and I also deleted the OS Facebook account. This worked for me. My app correctly received the callback from Safari. I re-installed the Facebook and tried it again and my app still worked (receiving the callback from the Facebook app).But, when I logged back into the OS Facebook account my app no longer received the callback.
I am currently using the supplied FBLoginView. I think from this point I will implement a custom login view for Facebook so that I can apply breakpoints on each of the functions.
I am wondering at this point if this isn't an issue with the Beta version of iOS 8. I am not entirely convinced that it is because I have been unable to find mention of other developers having this same issue. Just a thought

If you're using the Facebook SDK, login events are handled differently depending on the environment. You may want to check all callbacks as the Facebook SDK can use the settings fb credentials, pages app, Facebook app, or web view to log in...

The issues cleared themselves up. They appear to have been related to the beta release of Xcode or the Swift language.

Related

TestFlight build is not working same for every user

I'm new to iOS development.
I have a app built with React Native and already deployed on app store. I'm working on version 2.0 of the app. Previous version was built by some other developer company.
They delivered the source code for the version one, I'm gonna work on top of the codes of version one.
I've pushed a build on TestFlight to check if the existing codes are okay.
Now on TestFlight,
most of the testers are not finding any problems but some users can't login. Whenever they try to login, either there is an infinite loading screen or the app takes back to splash screen. The users then tries again to login but again after entering otp, user is sent back to splash screen.
Now this scenario is happening only with 2, out of our 20+ testers. We don't know where the problem is because we can't recreate the same issue in other devices.
Also, this same app with same code is deployed on google play store and working without any issue.
Has anyone else faced similar issue? Is it a problem with the test flight?
N.B: Everyone using iphone with latest iOS update 16.3
Try to log in with their credentials on your simulator/local device where you have access to logs etc.
Sounds to me like there's an issue with some specific accounts, maybe they have some properties in their accounts that has been altered/removed that's making the login process fail / load the correct content.
Edit: If there's infinite loading, have they checked their internet connectivity as well?

Facebook Login on iOS opens the wrong app

An user is trying to login with Facebook in my app. He has an iPhone 4S, iOS 9, and has the Facebook App installed.
When trying to login he receives an alert asking for "Open in ". If he accepts the suggestion, the other app is opened and he can't login into my app. If he cancels he doesn't login as well.
In his specific case the unrelated app was "Sweatt", and when he uninstalled it he was able to login with the Facebook app. Though, upon logging in, in my app the button "Return to Facebook" appeared on the top left corner, as if my app was executed by Facebook and not the other way around.
Any tips? Might this be an issue specific to iOS 9?
Check is LSApplicationQueriesSchemes is correct in your app.
Also for such situation check this workaround solution:
Facebook's login opens the wrong app

Facebook iOS9 Different Access Token

After updating my project and respective pods for iOS9 and Swift 2.1, I've been dealing with a few oddities in the Facebook SDK.
I have upgraded to FBSDK 4.9.1 - tried, 4.9.0 and currently running 4.6.0. I have added all the new entries to the plist.
Now, I don't receive most of the common problems other users are having with the new SDK, and can't seem to find someone with a similar issue as mine.
The Facebook authorization process still opens and works on iPhone's 6 and higher it seems (running iOS9 and up)
However on devices such as an iPhone 5s (running iOS9 and up), the dialog shows up, yet the token given back to us from Facebook is different than it used to/should be/other versions of the app, and we use the FB token to authenticate into our app.
What could be missing or wrong?
After sniffing the packets we realized now that Facebook uses the Safari Web View, instead of opening up via App, Facebook was using an old Cached Session from another account on Safari.
Silly mistake - but also an oddity with the new Facebook SDK.
Hope this helps someone else out.

iOS Facebook SDK Not Redirecting After Authentication on Device

I recently followed a tutorial (http://www.brianjcoleman.com/tutorial-how-to-use-login-in-facebook-sdk-4-0-for-swift/) which outlines how to use the Facebook iOS SDK in Swift to create a login view.
Everything works fine when I test in the iOS Simulator, but when I load my application (and the sample app provided by the tutorial author) on an actual iOS device, the application attempts to open the Facebook app installed on my device and leaves me with a blank screen with a cancel button in the top left corner.
I know that this at least partially works on a device as if I remove my bundle identifier from the Facebook developer page, I get an error that states I must add it back in.
I get the feeling I'm missing some sort of redirect that's necessary to hand off the authorization process from the Facebook app back to my app, but any advice anyone has would be awesome.
Also, I'm running XCode 6.4 targeting iOS 8.3, but I'm testing on a device running iOS 9. Everything seems to be running fine, but maybe this is part of the problem?
The clue on your question is iOS 9, I highly recommend checking out this documentation: https://developers.facebook.com/docs/ios/ios9 you're most likely missing many important steps as well as the latest Facebook iOS SDK.

Why is the Facebook SDK for iOS throwing the "FBErrorCategoryUserCancelled" error when the user has not canceled?

There was a similar question to this one posted not so long ago but it appears that the Apple Review team had messed up in that case. I have the same problem myself in that when clicking the "Log in with Facebook" button nothing happens, and since adding the error handling code taken from Facebook developer section the console is logging user cancelled login if when someone who has the Facebook app on their phone already tries log in via my app.
If they have not got the Facebook app on their phone is uses Safari by default, and works perfectly.
Does anybody know why this might be the case? And if so a fix to allow it to work correctly.
This seems to be an issue when using Facebook iOS SDK 3.13.1. I upgraded to
Facebook iOS SDK 3.14.1 and this problem went away.

Resources