How to test Firebase passwordless login on iOS? - ios

I'm using Firebase passwordless login on my Android app with no problem but I can't find a way to test it on iOS because the email link always redirect to the App Store, which is the escape route in case it doesn't find the app installed.
On Android, the system recognizes the debug/test version as the app to open and everything works fine. But on iOS it seems the Testflight version isn't recognized as the same app, thus escaping to the App Store. And yes, I'm using the same app identifier otherwise the compilation wouldn't appear on the Testflight.
Same problem while debugging connected to the computer without using the Testflight approach.
I know Firebase has the Apple login (beta) option now, but I'm using flutter and things aren't working well for now so passwordless login is the best way to go.

I found out that I was missing a couple special steps needed just for iOS.
This page helped me adding the missing steps.
Now I can test the app on the simulator. I haven't tested it on Testflight yet.

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?

Expo v33 Managed Application - Facebook and Google login not working on deployed iOS

It works on Android as well as on the Simulator and Expo Client but doesn't work when we publish the App on the App Store or manually add .ipa on the iPad.
Have tried most of the solutions
https://blog.expo.io/react-native-google-sign-in-with-expo-d1707579a7ce
https://docs.expo.io/versions/latest/sdk/google-sign-in/
Getting the following error for Facebook:
Tried t operform Facebook login iwth behavior '(null)'
, but no Facebook app id was provided.
Specify app id in Info.plist or switch to 'web' behavior
Google failing as well and not able to get any error for Google.
First of all, since this is a very fresh incident, I inform that this response is not a definitive answer, but rather an educated guess.
I am also facing this issue, and in my case it is working fine on simulator using expo app version 2.13.x but happening while running the expo app (version 2.14.1.107621) on physical iphone.
I haven't tested on android (neither simulator nor real device), but most people say it is happening on iOS only.
I did some research and found that according to expo SDK 36 blog post, the facebook module now has to be initialized with initializeAsync() BEFORE calling logInWithReadPermissionsAsync(). Of course that this should be applicable only to apps using version 36 of expo SDK, but maybe the latest expo-cli (3.11.1) and expo-app (2.14.x) for iOS have issues that prevent them from realizing the legacy behaviour on facebook module of previous SDKs (like mine, version 33), thus producing the error.
Meanwhile, let us see the new replies on this thread of expo forums: https://forums.expo.io/t/facebook-login-promise-rejection-on-ios/30969

Why the Flutter phone authentication won't work my real device

I have encountered a strange problem. I'm using the Flutter tool to create my iOS app which requires Firebase phone authentication. I was able to make it work on the other app platform without any fuss, but I'm not able to make it work on iOS real device. As per the documentation, I have to register an APN key from the developer account which I did and added my app's bundle ID too. This key I had to upload in my app console in Firebase which I also did. The REVERSE_CLIENT_ID was entered in the project settings in Xcode too, so the simulator version works flawlessly.
However, when it came to make it work on the real iPhone, I get this issue
flutter: exception code verifyPhoneNumberError message Invalid token.
I just am not able to make out what the issue is. One thing to note is that I had created a native Swift version using same APN key with different App ID for test purpose. Could this be a cause? Should I create a new APN key and will that allow my old App ID?
I got it working by doing a couple of things. I don't really know which one is the actual reason of it working, but along with official docs, I also followed this blog post https://medium.com/flutter-community/flutter-adding-sign-in-with-google-and-phone-authentication-to-your-app-69f681518f9b for help and achieved it due to the blogger's additional help when asked.
Basically I created a new APN key altogether for both push notifications and Firebase phone authentication, then uploaded in Firebase console (removing my old one). Later, the blogger suggested I also enable Background modes for remote notifications in my Xcode project settings. I didn't know this, as I had thought the Push Notifications switch was enough. Anyhow, bam! it started working.

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.

iOS simulator build for Facebook app approval crashes

I have done everything specified by Facebook. I even validated the sim build using the ios-sim tools and it runs fine on my Mac. There are no crashes. Has anyone had this problem before? What am I missing. here is a screenshot :
Edit I gave it another try and I got the same results. Even for the Android build. I was thinking tht maybe i sent them a zip by mistake but this time I double checked that I'm sending them a link to a .apk file to download from Mega.nz. Testing the iOS sim build on my end yields nothing since the game runs fine. I'm in dire need of some sage advice from someone who has gone trough this process. Here is another screenshot from todays rejection.
In my case I just set the app in facebook to be active for the public. This allowed my users to log in and share post, from the app to facebook. I'm Only missing the publish_actions permission. Just get your app approved on the app store and send facebook the link for that. Simulation builds just dont work for them
Dude I never tried it before but I read somewhere that if you are getting trouble to get approved by selecting iOS on submitting you can select Android as platform on submission and after approved your facebook integrations will be working fine for iOS apps too.
Doesn't cost too much to have a try ;)

Resources