FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
101 stars 17 forks source link

Please register custom URL scheme 'app...'in the app's info.plist file (IOS) #1373

Closed lxrinc closed 8 months ago

lxrinc commented 9 months ago

Has your issue been reported?

Current Behavior

I am trying to login on IOS using test flight and receiving an error when I press the sign-in button. A snack bar shows up with the error "Please register custom URL scheme 'app...'in the app's info.plist file (IOS)".

Expected Behavior

I expected the screen to redirect to the phone verification screen where a verification code is sent. It works very well on Android devices but IOS, it is giving an error.

Steps to Reproduce

https://github.com/FlutterFlow/flutterflow-issues/assets/117313181/8c0c1308-f38a-41f6-85ae-0e4b80927751

  1. Access the App
  2. Redirects to choose a language
  3. Select on the "Get Started" button
  4. Choose a country code and any phone number
  5. Press Sign In
  6. The error shows up

Reproducible from Blank

Bug Report Code (Required)

ITEehcmA0492pbwA0LrcK8FslQMwJ0QlUIInj+0bWRMhNZfpEZYAf+DSTBFLYtTne25+C1WYhnkC0PTzkezxGvYEHxedfJxZ+b5XQQ7heDqlbK2VDqWwOnBCQJ1XJ2Kz0Z7Qvx0mAM1udVYG6mePevCdG3qCf9qOYwx5e6fDbOY=

Context

I am trying to test my app on iphone devices but after the login screen I cannot proceed to test the app.

Visual documentation

https://github.com/FlutterFlow/flutterflow-issues/assets/117313181/99b86bbc-7963-4224-8ad4-e6a1e28260e7

Additional Info

No response

Environment

- FlutterFlow version: v3.1 (released 28th August, 2023)
- Platform: Web
- Browser name and version: Brave - Version 1.57.53 Chromium: 116.0.5845.114 (Official Build) (64-bit)
- Operating system and version affected: Windows 10
hariprasadms commented 9 months ago

Hi @lxrinc - Thanks for submitting the issue. I looked at your project downloaded code and I can reproduce above error message. However, in general plist property details related to url schema it looks all right. See below. Not really sure how your project got this error.

image

I would suggest, re-built the iOS version one or two more times and see consistency of the issue. If issue still persists, I can mark this as project specific issue. Let me know how it goes. Thanks

lxrinc commented 9 months ago

@hariprasadms I have redeployed several times but the issue persists. I cross-checked with Email Auth and it works well but with Phone Auth, it is still persisting the error only on IOS.

I set up another project to check if it was with the project I shared with you only, however in the new project - the error is still persisting on IOS. I have tried multiple IOS devices and the issue remains. Yet, Email Auth works very well on the new project too.

How can it be resolved?

hariprasadms commented 9 months ago

Hi, Sorry, I looked your project again but I see CFBundleURLSchemes value is not populated. I think this could be the issue. Can you please check and add this value manually from downloaded GoogleService-info.plist file

Sample -

image

Below is your project info.plist file.

image
hariprasadms commented 9 months ago

I looked at your project GoogleService-info.plist file and REVERSED_CLIENT_ID is not present in the file. I can mark this as a project specific bug. Dev team can investigate shortly.

Meanwhile you can regenerate the firebase config files and see if that can resolve the issue. If it can fix the issue, please close the issue. Thanks

lxrinc commented 9 months ago

Hi, @hariprasadms I regenerated the Firebase config, and yet the error is persisting. I will wait for your feedback.

jasminder commented 8 months ago

@hariprasadms This issue is persisting. Kindly look into this. cc @agreaves

adialloo commented 8 months ago

same problem

julien-digilink commented 8 months ago

same problem

sbis04 commented 8 months ago

Everyone facing this issue, if you download the GoogleServiceInfo.plist file from the Firebase console (it should be inside gear icon(left panel)> Project settings > General > scroll down and select the iOS app), does it contain the REVERSED_CLIENT_ID field?

Screenshot 2023-09-19 at 1 59 28 PM
lxrinc commented 8 months ago

@sbis04 It doesn't contain the REVERSED_CLIENT_ID in the GoogleServiceInfo.plist

sbis04 commented 8 months ago

@lxrinc Okay. And, just making sure, in Firebase Authentication which auth methods do you have enabled (is it only Phone Auth)?

lxrinc commented 8 months ago

@sbis04 Initially it was Phone Auth only however since it wasn't working on IOS enabled Email too. It is not working even with email as active.

sbis04 commented 8 months ago

Hmm, this is interesting. Not sure why REVERSED_CLIENT_ID is not present in the file, I'll investigate into it further.

@lxrinc One more question, did you try Regenerate Config File from Settings > Firebase inside FlutterFlow? Did that still not fix the issue?

lxrinc commented 8 months ago

@sbis04 Yes I did that a few times, assuming that was the problem but it still persisted.

sbis04 commented 8 months ago

@lxrinc Can you try these steps once?

  1. Enable "Google Sign In" in your Firebase project.
  2. Go to the Firebase console > Project settings > Select the iOS app > Remove this app.
  3. Regenerate the config file again inside FlutterFlow
  4. Try the app or check if the GoogleService-Info.plist has the REVERSED_CLIENT_ID field now.

Let me know if this helps in any way.

lxrinc commented 8 months ago

@sbis04 It worked! Thank you so much

sbis04 commented 8 months ago

Nice, thanks for letting me know! This seems like some kind of bug on the Firebase side, because phone auth requires the REVERSED_CLIENT_ID still it doesn't get generated unless Google Sign In is enabled in some cases.

DamilolaDami commented 7 months ago

can this be fixed because this requires us to do some extra config that our apps doesn't really needs. Thank you

Gintasz commented 7 months ago

can this be fixed because this requires us to do some extra config that our apps doesn't really needs. Thank you

try to enable email & google sign in on project firebase, even if you don't use it, that fixed this error for me.

DamilolaDami commented 7 months ago

can this be fixed because this requires us to do some extra config that our apps doesn't really needs. Thank you

try to enable email & google sign in on project firebase, even if you don't use it, that fixed this error for me.

Yea this a workaround, not a fix.

eujoseant commented 5 months ago

can this be fixed because this requires us to do some extra config that our apps doesn't really needs. Thank you

try to enable email & google sign in on project firebase, even if you don't use it, that fixed this error for me.

Do I have to keep these options turned on afterwards? Even if I don't use them? For better operation and not generating the error or I can turn it off.

navaidali commented 5 months ago

Getting same error, I tried to regenerate the config file but the issue persists. any solution?

eyuphan-oguz commented 4 months ago

Copy the value inside the single quotes from the Snackbar, for example: 'app-1-123456789-ios-bcbaac540bd7dae7a'.

Open your Flutter project.

Locate the ios folder in your project directory.

Right-click on the ios folder and choose "Open in Xcode".

In Xcode, find the name of your project on the left, right-click on it, and choose "Open in Finder".

In the Finder window, locate the "Runner" folder.

Inside the "Runner" folder, double-click to open the Info.plist file.

In the opened Info.plist file, switch to the "Information Property List" view at the top.

To add URL Types, right-click on an empty space, and select "Add Row".

In the added row, go to the left column and name it "URL types".

In the right column of the added row, click on the dropdown arrow and create "Item 0" underneath.

Under "Item 0", set URL Identifier to "app-1-123456789-ios-bcbaac540bd7dae7a".

Under "Item 0", set URL Schemes to "app-1-123456789-ios-bcbaac540bd7dae7a".

Save your changes and close Xcode.

And restart your project