cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Winston (JIRA)" <>
Subject [jira] [Commented] (CB-8047) [WKWebView][iOS8] wkwebview / local webserver plugin orientation issue
Date Fri, 03 Apr 2015 18:51:54 GMT


Winston commented on CB-8047:

We've found a work around to this problem. 

In the generated Cordova MainViewController.m, there is a method that determines what orientations
should be permitted. The default implementation is to call your javascript app. I haven't
dug into why this fails but I'd suspect with WKWebView, javascript is not yet running. So
the default implementation returns NO for all supported orientations. If you override it to
return YES, then orientations work fine. See code snippet below.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    // Return YES for supported orientations
    // return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
    return YES; // WKWebView doesn't respond properly yet, so allow all orientations

> [WKWebView][iOS8] wkwebview / local webserver plugin orientation issue
> ----------------------------------------------------------------------
>                 Key: CB-8047
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: iOS
>         Environment: IOS
>            Reporter: Dustin Nielson
>            Assignee: Shazron Abdullah
> After installing the `wkwebview-engine` plugin on ios device (tested iPhone 6, iPad mini
2, iPad retina) and enabling all orientations in xcode.  Upon successful build the devices
have fixed portrait orientation that doesn't change when device is rotated.
> The `wkwebview` branch of cordova-ios was used. This problem does not occur in the `master`

This message was sent by Atlassian JIRA

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

View raw message