Description
Summary
iOS Phone Authentication fails on Unity 6 (6000.0.68f1 and later). After the user completes the reCAPTCHA image challenge, the SafariViewController gets stuck at about:blank and the SMS code is never sent. No errors are logged.
Root Cause
Starting from Unity 6000.0.68f1, Unity automatically inserts UIApplicationSceneManifest into Info.plist to support Apple's UIScene-based lifecycle (in preparation for the future iOS UIScene requirement). With this manifest, iOS routes incoming URLs to UnityScene.scene(_:openURLContexts:) instead of the legacy AppDelegate.application(_:open:options:).
However, UnityScene does not forward received URLs to the AppDelegate chain. Since Firebase Auth's swizzling mechanism hooks into the AppDelegate chain (and cannot intercept UISceneDelegate methods due to Apple's architecture), the reCAPTCHA callback URL never reaches FIRAuth, leaving the SafariViewController stuck at about:blank.
This is documented for native iOS developers at https://firebase.google.com/docs/auth/ios/phone-auth (see the SceneDelegate snippet calling [FIRAuth.auth canHandleURL:url]), but the equivalent handling is not provided in the Firebase Unity SDK, and the Unity Phone Auth documentation (https://firebase.google.com/docs/auth/unity/phone-auth) does not mention this requirement.
Workaround
Removing UIApplicationSceneManifest from Info.plist via a PostProcessBuild script restores the legacy AppDelegate routing and fixes the issue:
[PostProcessBuild(999)]
public static void OnPostProcess(BuildTarget target, string path)
{
if (target != BuildTarget.iOS) return;
var plistPath = path + "/Info.plist";
var plist = new PlistDocument();
plist.ReadFromFile(plistPath);
if (plist.root.values.ContainsKey("UIApplicationSceneManifest"))
plist.root.values.Remove("UIApplicationSceneManifest");
plist.WriteToFile(plistPath);
}
This is a temporary workaround that will not survive Apple's UIScene mandate (expected in the iOS release following iOS 26).
Related Issues
Request
Please consider adding UIScene support to the Firebase Unity SDK so that URL handling required by Firebase Auth works out of the box on Unity 6 projects. This will also become mandatory once Apple enforces the UIScene lifecycle in a future iOS release.
Other SDKs (e.g., AppLovin MAX's ATT prompt flow) appear to be affected by the same UIScene transition, suggesting this is a broader concern for Unity iOS apps.
Reproducing the issue
Environment
- Unity 6000.0.72f1 (also reproducible on 6000.0.68f1 through latest; NOT reproducible on 6000.0.67f1 or earlier)
- Xcode 16.1
- iOS device (real device required — Phone Auth cannot be tested on simulator)
Steps
- Create a Unity 6 project (6000.0.68f1 or later) with Firebase Auth installed.
- Configure Firebase Phone Authentication in the Firebase Console (enable Phone provider, set SMS region policy, upload APNs key).
- Implement Phone Auth via
PhoneAuthProvider.VerifyPhoneNumber in Unity.
- Build for iOS with Xcode 16.x and deploy to a real device.
- Run the app and trigger the phone authentication flow with a real phone number.
- The reCAPTCHA WebView opens. Complete the image challenge (e.g., "Select all images with cars").
- Observe: After completing the challenge, the WebView navigates to a
firebaseapp.com URL and then becomes stuck at about:blank. The SafariViewController is never dismissed, and no SMS is sent.
Note: Reproducible with both real phone numbers and test phone numbers configured in Firebase Console — test numbers still go through the reCAPTCHA flow and hit the same wall, indicating the issue is not in the SMS sending logic but in the URL callback handling.
Expected behavior: SafariViewController should dismiss automatically after reCAPTCHA succeeds, and the SMS verification code should be sent to the provided phone number.
Actual behavior: SafariViewController remains stuck at about:blank. No SMS sent. No errors logged.
Firebase Unity SDK Version
12.10.0, 13.6.0
Unity editor version
6000.0.72f1
Installation Method
Unity Package Manager
Problematic Firebase Component(s)
Analytics, App Check, Authentication, Crashlytics
Other Firebase Component(s) in use
No response
Additional SDKs you are using
No response
Targeted Platform(s)
Apple Platforms
Unity editor platform
Mac
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
If using CocoaPods for Apple platforms, the project's Podfile.lock
Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
Description
Summary
iOS Phone Authentication fails on Unity 6 (6000.0.68f1 and later). After the user completes the reCAPTCHA image challenge, the SafariViewController gets stuck at
about:blankand the SMS code is never sent. No errors are logged.Root Cause
Starting from Unity 6000.0.68f1, Unity automatically inserts
UIApplicationSceneManifestintoInfo.plistto support Apple's UIScene-based lifecycle (in preparation for the future iOS UIScene requirement). With this manifest, iOS routes incoming URLs toUnityScene.scene(_:openURLContexts:)instead of the legacyAppDelegate.application(_:open:options:).However,
UnityScenedoes not forward received URLs to the AppDelegate chain. Since Firebase Auth's swizzling mechanism hooks into the AppDelegate chain (and cannot intercept UISceneDelegate methods due to Apple's architecture), the reCAPTCHA callback URL never reachesFIRAuth, leaving the SafariViewController stuck atabout:blank.This is documented for native iOS developers at https://firebase.google.com/docs/auth/ios/phone-auth (see the SceneDelegate snippet calling
[FIRAuth.auth canHandleURL:url]), but the equivalent handling is not provided in the Firebase Unity SDK, and the Unity Phone Auth documentation (https://firebase.google.com/docs/auth/unity/phone-auth) does not mention this requirement.Workaround
Removing
UIApplicationSceneManifestfromInfo.plistvia a PostProcessBuild script restores the legacy AppDelegate routing and fixes the issue:This is a temporary workaround that will not survive Apple's UIScene mandate (expected in the iOS release following iOS 26).
Related Issues
Request
Please consider adding UIScene support to the Firebase Unity SDK so that URL handling required by Firebase Auth works out of the box on Unity 6 projects. This will also become mandatory once Apple enforces the UIScene lifecycle in a future iOS release.
Other SDKs (e.g., AppLovin MAX's ATT prompt flow) appear to be affected by the same UIScene transition, suggesting this is a broader concern for Unity iOS apps.
Reproducing the issue
Environment
Steps
PhoneAuthProvider.VerifyPhoneNumberin Unity.firebaseapp.comURL and then becomes stuck atabout:blank. The SafariViewController is never dismissed, and no SMS is sent.Note: Reproducible with both real phone numbers and test phone numbers configured in Firebase Console — test numbers still go through the reCAPTCHA flow and hit the same wall, indicating the issue is not in the SMS sending logic but in the URL callback handling.
Expected behavior: SafariViewController should dismiss automatically after reCAPTCHA succeeds, and the SMS verification code should be sent to the provided phone number.
Actual behavior: SafariViewController remains stuck at
about:blank. No SMS sent. No errors logged.Firebase Unity SDK Version
12.10.0, 13.6.0
Unity editor version
6000.0.72f1
Installation Method
Unity Package Manager
Problematic Firebase Component(s)
Analytics, App Check, Authentication, Crashlytics
Other Firebase Component(s) in use
No response
Additional SDKs you are using
No response
Targeted Platform(s)
Apple Platforms
Unity editor platform
Mac
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
If using CocoaPods for Apple platforms, the project's Podfile.lock
Expand
Podfile.locksnippet👀 Replace this line with the contents of your Podfile.lock!