[ 
https://issues.apache.org/jira/browse/CB-14087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483777#comment-16483777
 ] 

Ken Naito edited comment on CB-14087 at 5/22/18 10:46 AM:
----------------------------------------------------------

Hi, santosh.

I can not reproduce your issue by using iPhone 5S and iOS 11.3.1.
However I noticed the another issue that InAppBrowser will freeze after 
focusing "form text input". (For example, google search form)
This issue happens for all iOS 11.*.* not only iOS 11.3.1.

The above issue is solved by changing the file CDVInAppBrowser.m as

<pre>
    dispatch_async(dispatch_get_main_queue(), ^{
        if (weakSelf.inAppBrowserViewController != nil) {
            [weakSelf.viewController presentViewController:nav animated:YES 
completion:nil];
            /*
            CGRect frame = [[UIScreen mainScreen] bounds];
            UIWindow *tmpWindow = [[UIWindow alloc] initWithFrame:frame];
            UIViewController *tmpController = [[UIViewController alloc] init];
            [tmpWindow setRootViewController:tmpController];
            [tmpWindow setWindowLevel:UIWindowLevelNormal];

            [tmpWindow makeKeyAndVisible];
            [tmpController presentViewController:nav animated:YES 
completion:nil];
             */
        }
    });
</pre>

in `- (void) show:(CDVInvokedUrlCommand*)command` method.

This may resolve your issue.





was (Author: knaito):
Hi, santosh.

I can not reproduce your issue by using iPhone 5S and iOS 11.3.1.
However I noticed the another issue that InAppBrowser will freeze after 
focusing "form text input". (For example, google search form)
This issue happens for all iOS 11.*.* not only iOS 11.3.1.

The above issue is solved by changing the file CDVInAppBrowser.m as

```
    dispatch_async(dispatch_get_main_queue(), ^{
        if (weakSelf.inAppBrowserViewController != nil) {
            [weakSelf.viewController presentViewController:nav animated:YES 
completion:nil];
            /*
            CGRect frame = [[UIScreen mainScreen] bounds];
            UIWindow *tmpWindow = [[UIWindow alloc] initWithFrame:frame];
            UIViewController *tmpController = [[UIViewController alloc] init];
            [tmpWindow setRootViewController:tmpController];
            [tmpWindow setWindowLevel:UIWindowLevelNormal];

            [tmpWindow makeKeyAndVisible];
            [tmpController presentViewController:nav animated:YES 
completion:nil];
             */
        }
    });
```

in `- (void) show:(CDVInvokedUrlCommand*)command` method.

This may resolve your issue.




> InAppBrowser.open is getting stuck after first time use on iOS version 11.3.1
> -----------------------------------------------------------------------------
>
>                 Key: CB-14087
>                 URL: https://issues.apache.org/jira/browse/CB-14087
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-inappbrowser
>    Affects Versions: cordova-ios@4.3.1
>         Environment: Apple iOS 11.3.1( Working fine on earlier versions)
> Device : iPad and iPhone
>  
>            Reporter: santosh nikam
>            Priority: Critical
>              Labels: 11.3.1, inappbrowser, ios
>
> Hello Team,
> We are India based software development company working for US customer. In 
> our mobile application "PTOffice", we are using Cordova InAppBrowser plugin 
> to open our external website pages. It was working fine for iOS versions 
> lower than 11.3.*. But, now we are having issues with 11.3.1 since 
> 24-Apr-2018.
> Issue is - InAppBrowser.open is working properly for first time. But, if we 
> close the app (i.e. removing it from memory) and try same action, 
> InAppBrowser.open is getting stuck and page loading is not getting completed. 
> Only way to get it working again is log-off & restart device OR do a fresh 
> app install again. There has been no code change and this code continues to 
> work on older iOS versions (< 11.3.1). But, somehow problem on 11.3.1
> / We've used below code in our app to open server side page in the 
> InAppBrowser. /
> var target = "_blank";
> var options = "location=no,toolbar=yes,zoom=no,hidden=yes";
> var ref = cordova.InAppBrowser.open(encodeURI(url), target, options);
> ref.addEventListener("loadstop", function (event) {
>  ref.show();
> });
> Please provide solution to open the web pages consistently in InAppBrowser on 
> iOS Version 11.3.1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to