-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Can't open an external link when running on iOS 18 (e.g. with '_system' as target) #1080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm also having this problem with IOS 18.0.3. However, I'm using it with Ionic: const ref = this.iab.create(_url, '_system', options); |
See this link: |
@kenguest I realized that the code in this file differed from the version 6.0 of the plugin. cordova plugin remove cordova-plugin-inappbrowser After performing these steps, the method's code changed, and Xcode no longer displayed any warnings: Now, the system browser (Safari) opens and loads the website correctly. |
I'll try that |
Hi, I fixed this on our enterprise app. Obj-c openUrl function syntax was changed. Just fork the repo, and update the Obj-c code that's showing the warning. If you're not familiar with forking plugins, you'll need to look into that. |
Bug Report
Problem
External links won't open on iOS 18. They do open on iOS 17. I upgraded to iOS 18 and it does not any more. e.g.
<a target="_system" href="https://google.com">Click me</a>
iOS 18 is now on 68% of iOS devices - https://uk.pcmag.com/operating-systems/156441/ios-18-adoption-hits-68-among-iphone-users - so it's rather important this gets fixed.
This is described in apache/cordova-ios#1511 which apparently was closed with no code change made. (I looked at the repo for cordova-plugin-inappbrowser and did a "git blame" - couldn't find any relevant code changes)
What is expected to happen?
The link should open in an external browser, most likely Safari.
What does actually happen?
Nothing - no message, no log entry (apart from below in xcode) and no crash. A great absence of the link not opening :(
Information
Logs in Xcode when this happens :
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).
Command or Code
Build an app with the code below on iOS 18 and click the link :
<a target="_system" href="https://google.com">Click me</a>
Or use code like:
cordova.InAppBrowser.open('https://google.com/', '_system');
Environment, Platform, Device
An iPad or iPhone running iOS 18.
Version information
Checklist
The text was updated successfully, but these errors were encountered: