You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "kenguest (via GitHub)" <gi...@apache.org> on 2025/02/18 10:38:22 UTC

[I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

kenguest opened a new issue, #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080

   # 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 https://github.com/apache/cordova-ios/issues/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
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue closed issue #1080: Can't open an external link when running on iOS 18 (e.g. with '_system' as target)
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "guilhermoMetaway (via GitHub)" <gi...@apache.org>.
guilhermoMetaway commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2672610352

   I'm also having this problem with IOS 18.0.3.
   
   However, I'm using it with Ionic: 
   `
   import {InAppBrowser} from '@awesome-cordova-plugins/in-app-browser/ngx'
   
   const ref = this.iab.create(_url, '_system', options);
   ref.show();
   `
   No page opens and no errors or exceptions are thrown.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "phyr0s (via GitHub)" <gi...@apache.org>.
phyr0s commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2854455449

   @dpogue  it's possible to generate new version with @FabioFerrua  solution? It's really big issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "blancaster94 (via GitHub)" <gi...@apache.org>.
blancaster94 commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2754926300

   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. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "AlexDonn19 (via GitHub)" <gi...@apache.org>.
AlexDonn19 commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2688023388

   See this link:
   https://discussions.unity.com/t/application-openurl-doesnt-work-on-ios-18/1553960/12
   You can change CDVWKInAppBrowser.m , string 364 to something like this:
           //   [[UIApplication sharedApplication] openURL:url];
           if (@available(iOS 10.0, *)) {
             [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
               if (!success) {
                 NSLog(@"Failed to open URL: %@", url);
               }
             }];
           } else {
             BOOL success = [[UIApplication sharedApplication] openURL:url];
             if (!success) {
               NSLog(@"Failed to open URL: %@", url);
             }
           }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "FabioFerrua (via GitHub)" <gi...@apache.org>.
FabioFerrua commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2688569281

   @kenguest 
   I was in the exact same situation as you, encountering the same errors. Upon examining the CDVWKInAppBrowser.m file, I noticed that Xcode was displaying a warning:
   
   ![Image](https://github.com/user-attachments/assets/26da567c-3cd7-4889-9fbe-5e10b946c001)
   
   I realized that the code in this file differed from the version 6.0 of the plugin.
   To resolve the issue, I simply uninstalled and reinstalled the plugin using the following commands:
   
   cordova plugin remove cordova-plugin-inappbrowser
   cordova plugin add cordova-plugin-inappbrowser
   
   After performing these steps, the method's code changed, and Xcode no longer displayed any warnings:
   
   ![Image](https://github.com/user-attachments/assets/b924fac7-f217-4d74-be60-154c89d6fc31)
   
   Now, the system browser (Safari) opens and loads the website correctly. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "guilhermoMetaway (via GitHub)" <gi...@apache.org>.
guilhermoMetaway commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2725170679

   > [@kenguest](https://github.com/kenguest) I was in the exact same situation as you, encountering the same errors. Upon examining the CDVWKInAppBrowser.m file, I noticed that Xcode was displaying a warning:
   > 
   > ![Image](https://github.com/user-attachments/assets/26da567c-3cd7-4889-9fbe-5e10b946c001)
   > 
   > I realized that the code in this file differed from the version 6.0 of the plugin. To resolve the issue, I simply uninstalled and reinstalled the plugin using the following commands:
   > 
   > cordova plugin remove cordova-plugin-inappbrowser cordova plugin add cordova-plugin-inappbrowser
   > 
   > After performing these steps, the method's code changed, and Xcode no longer displayed any warnings:
   > 
   > ![Image](https://github.com/user-attachments/assets/b924fac7-f217-4d74-be60-154c89d6fc31)
   > 
   > Now, the system browser (Safari) opens and loads the website correctly.
   
   I'll try that


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "GusLAN (via GitHub)" <gi...@apache.org>.
GusLAN commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2854460022

   We have same problem in our application 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "guilhermoMetaway (via GitHub)" <gi...@apache.org>.
guilhermoMetaway commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2854548015

   I had to delete the plugins and node_modules folders from the project root, update my dependencies and reinstall them. After that, I was able to use the plugin correctly on iOS.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Can't open an external link when running on iOS 18 (e.g. with '_system' as target) [cordova-plugin-inappbrowser]

Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on issue #1080:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1080#issuecomment-2854976962

   @phyr0s The change mentioned by FabioFerrua is already fixed in version 6.0.0 of the inappbrowser plugin: https://github.com/apache/cordova-plugin-inappbrowser/pull/1031


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org