cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jcesarmobile (JIRA)" <>
Subject [jira] [Closed] (CB-12211) InAppBrowser - problem in iOS 10 when try to open an url in external browser with, "_system")
Date Fri, 20 Jan 2017 23:11:26 GMT


jcesarmobile closed CB-12211.
    Resolution: Not A Problem
      Assignee: jcesarmobile

Sorry for not answering before.

This is not an error, cordova-ios apps need gap: protocol on the CSP to make plugins work.

See the CSP that the default Cordova app includes, with the comment where it explains some
of them, and the most important, the  gap:

On iOS 10 the CSP became stricter and blocks the plugins from working if you don't include
the gap:

        Customize this policy to fit your own app's needs. For more guidance, see:
        Some notes:
            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native
            * is required only on Android and is needed for TalkBack
to function properly
            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities.
To change this:
                * Enable inline JS: add 'unsafe-inline' to default-src
        <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src
'self' data: content:;">

> InAppBrowser - problem in iOS 10 when try to open an url in external browser with,
> -------------------------------------------------------------------------------------------------------------
>                 Key: CB-12211
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>         Environment: iOS 10
>            Reporter: Marco
>            Assignee: jcesarmobile
> Consider the following scenario:
> 1. My Cordova App have a filter based on InAppBrowser like this:
> function openurlinexternalbrowser() {
>             $(document).on('click', 'a[target="_system"],a[target="_blank"]', function
(e) {
>                 e.preventDefault();
>                 var url = this.href;
>       , "_system");
>             });
> }
> 2. This filter permits to open the url in anchor tag ( <a>...</a> ) in external
browser. For example: 
>       <a class="link_no_decoration" href="" target="_blank">Test
> 3. So, my App uses InAppBrowser plugin and calls "" with "_system" as a target.
> What's happen when I try to open an url?
> - in iOS 9, all works fine, url it's open in external browser after click on a link;
> - in iOS 10 nothing happen, but if you click on a link, and then click twice on the home
button (like when you enter in multitasking mode), the browser appears and it opens the url.
> It's possible to fix this problem?
> Thank you

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message