Skip to content

Can't open an external link when running on iOS 18 (e.g. with '_system' as target) #1080

Open
@kenguest

Description

@kenguest

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

iOS 18.2
cordova-ios 7.1.0
cordova-plugin-inappbrowser 6.0.0
cordova 12.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions