You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "DagrutCr (via GitHub)" <gi...@apache.org> on 2024/11/28 12:39:34 UTC

[I] External links (target="_system") don't work on iOS 18 [cordova-ios]

DagrutCr opened a new issue, #1511:
URL: https://github.com/apache/cordova-ios/issues/1511

   # Bug Report
   
   ## Problem
   
   External links won't open anymore. I was on iOS 17 and it worked, I upgraded to iOS 18 and it does not anymore. Example : 
   
   ```html
   <a href="https://www.npmjs.com/package/cordova-ios">Click me</a>
   ```
   
   ### What is expected to happen?
   
   The link should open in an external browser, most likely Safari.
   
   ### What does actually happen?
   
   Nothing, no crash, log or message, except the one below in Xcode
   
   ## 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 : 
   
   ```html
   <a href="https://www.npmjs.com/package/cordova-ios">Click me</a>
   ```
   
   ### Environment, Platform, Device
   
   - iPhone 14
   
   ### Version information
   
   - iOS 18.1.1
   - cordova-ios 7.1.1
   - cordova 12.0.0
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [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] External links (target="_system") don't work on iOS 18 [cordova-ios]

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

   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] External links (target="_system") don't work on iOS 18 [cordova-ios]

Posted by "kenguest (via GitHub)" <gi...@apache.org>.
kenguest commented on issue #1511:
URL: https://github.com/apache/cordova-ios/issues/1511#issuecomment-2665140316

   Hi @DagrutCr 
   
   When is there going to be a new release of cordova-ios with this fix in it?
   
   iOS 18 adoption is up to 68% of all iphone users* and the latest release of corova-ios is from April 2024 - almost a year ago and well before this bug was reported.
   
   It would be great to have this problem go away - thank you! :-)
   
   *https://uk.pcmag.com/operating-systems/156441/ios-18-adoption-hits-68-among-iphone-users


-- 
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] External links (target="_system") don't work on iOS 18 [cordova-ios]

Posted by "DagrutCr (via GitHub)" <gi...@apache.org>.
DagrutCr closed issue #1511: External links (target="_system") don't work on iOS 18
URL: https://github.com/apache/cordova-ios/issues/1511


-- 
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] External links (target="_system") don't work on iOS 18 [cordova-ios]

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

   hmmm, I wonder if that's coming from here: https://github.com/apache/cordova-ios/blob/9beca6d7d3368c157cb5f712e348860dc0aceb3e/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m#L130
   
   We can probably change that to call `open(_:options:completionHandler:)` instead
   
   Just for the record, I don't believe `target="_system"` actually has any special meaning when used on links.


-- 
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] External links (target="_system") don't work on iOS 18 [cordova-ios]

Posted by "DagrutCr (via GitHub)" <gi...@apache.org>.
DagrutCr commented on issue #1511:
URL: https://github.com/apache/cordova-ios/issues/1511#issuecomment-2507065600

   I found where it was from : https://github.com/apache/cordova-plugin-inappbrowser/blob/b3a0d82c60ee2cff2d2b4ca8160325c34bd7b887/src/ios/CDVWKInAppBrowser.m#L364
   
   The issue arise when we are calling `openUrl` with no extra parameters, which is not the case here. I have some other plugins with this issue, I see. I'll report them or fix them.
   
   Thanks! :-)


-- 
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] External links (target="_system") don't work on iOS 18 [cordova-ios]

Posted by "DagrutCr (via GitHub)" <gi...@apache.org>.
DagrutCr commented on issue #1511:
URL: https://github.com/apache/cordova-ios/issues/1511#issuecomment-2665305106

   Hi @kenguest !
   
   The issue is not from this plugin, nor from cordova-plugin-inappbrowser (I was not using the latest version). I switched to the git version if that may help, though. The plugin causing the issue for me was cordova-plugin-photo-library, and I fixed it in the last two commits here : https://github.com/DagrutCr/cordova-plugin-photo-library/commits/master/ .


-- 
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] External links (target="_system") don't work on iOS 18 [cordova-ios]

Posted by "kenguest (via GitHub)" <gi...@apache.org>.
kenguest commented on issue #1511:
URL: https://github.com/apache/cordova-ios/issues/1511#issuecomment-2665589670

   hi @DagrutCr !
   Thanks for responding so quick!
   I'm not using that cordova-plugin-photo-library plugin - I guess the same bug is present in one of the other plugins that I'm using!
   
   Thanks again!
   


-- 
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] External links (target="_system") don't work on iOS 18 [cordova-ios]

Posted by "DagrutCr (via GitHub)" <gi...@apache.org>.
DagrutCr commented on issue #1511:
URL: https://github.com/apache/cordova-ios/issues/1511#issuecomment-2507038975

   That's not the faulty line here, after further investigations this line is not even called in my case (I've added some `NSLog()` before and after, none were in the logs). I guess it's from a plugin. That plugin may use a similar call though, so I'll see and report back what I find here :-)
   
   I'll keep looking, I should have an answer today.


-- 
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] External links (target="_system") don't work on iOS 18 [cordova-ios]

Posted by "kenguest (via GitHub)" <gi...@apache.org>.
kenguest commented on issue #1511:
URL: https://github.com/apache/cordova-ios/issues/1511#issuecomment-2665255779

   hi @DagrutCr @dpogue I don't understand why this ticket is marked as completed when the issue is still present in the code? (the problem is still happening that external links won't open on devices running iOS 18, and I don't see any new releases for the inappbrowser project)
   
   Do you need an issue/ticket created in the cordova-plugin-inappbrowser project instead? If that's the case, I've created one at https://github.com/apache/cordova-plugin-inappbrowser/issues/1080 with some more info in it than in this ticket.
   
   Thanks - and please let me know if you need me to provide any more information if needed!
   


-- 
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