FormidableLabs / react-native-app-auth

React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
https://commerce.nearform.com/open-source/react-native-app-auth
MIT License
2.04k stars 441 forks source link

iOS: iosCustomBrowser fails to open Chrome or any browser on iOS 18+ #1034

Open djopet00 opened 1 week ago

djopet00 commented 1 week ago

Issue

On iOS 18+, Chrome and other browsers can no longer be opened using the iosCustomBrowser property from within the React Native application.

Previously, setting iosCustomBrowser to any browser (e.g., 'chrome', 'safari', 'opera', 'firefox') worked without issues on iOS 17 and earlier versions.

Is there a workaround or fix for this issue? Lots of users are facing the same problem.


Environment

Additional Details

Xcode Console Message:

BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(:) needs to migrate to the non-deprecated UIApplication.open(:options:completionHandler:). Force returning false (NO).


Steps to Reproduce

  1. Set iosCustomBrowser: 'chrome' (or any other supported browser, such as 'safari', 'opera', 'firefox') using react-native-app-auth package.
  2. Run the app on a device or simulator with iOS 18 or later.
  3. Attempt to initiate an authentication flow that opens the specified browser.
  4. Browser does not open, and the Xcode console logs the message mentioned above.

VariabileAleatoria commented 1 week ago

We are facing the same error. We had to downgrade xcode to version 15.4 in order to overcome the issue, but an update of the library (I guess the ios sdk that this project wraps) is needed.

djopet00 commented 5 days ago

Yes, you’re absolutely right. Thank you for the response! Based on your feedback, I was also able to use Xcode v15.4 instead of v16 and resolve the issue, for now.

This library should be updated with the latest iOS SDK, as Apple has set a deadline: "Starting from April 2025, all iOS/iPadOS apps uploaded to the App Store must be built with the iOS 18 SDK." For more details, see Apple's documentation.

carbonrobot commented 5 days ago

We are waiting on the upstream AppAuth-IOS for a new release, but will release a patch as soon as we have it.

VariabileAleatoria commented 2 hours ago

We are waiting on the upstream AppAuth-IOS for a new release, but will release a patch as soon as we have it.

Is there an issue opened on the upstream repo?