wordpress-mobile / WordPress-Editor-iOS

⛔️ [DEPRECATED] A reusable iOS rich text editor component.
GNU General Public License v2.0
1.06k stars 210 forks source link

Switch to WKWebView instead of UIWebView #260

Open bummytime opened 10 years ago

bummytime commented 10 years ago

Title has it. This is an iOS 8 only api, but we could consider regressing to UIWebView for iOS 7 users.

Marketing blurb:

WKWebView is the centerpiece of the modern WebKit API introduced in iOS 8 & OS X Yosemite. It replaces UIWebView in UIKit and WebView in AppKit, offering a consistent API across the two platforms.

Boasting responsive 60fps scrolling, built-in gestures, streamlined communication between app and webpage, and the same JavaScript engine as Safari, WKWebView is one of the most significant announcements to come out of WWDC 2014.

bummytime commented 10 years ago

Mattt Thompson has a nice breakdown of it here: http://nshipster.com/wkwebkit/

sendhil commented 10 years ago

I think this is worthwhile as there's a good chance we'll drop iOS 7 support.

diegoreymendez commented 8 years ago

This is a status message posted by @SergioEstevao in an initial/tentative PR. I'm posting this here for context:

Trying to upgrade the uses of UIWebView to WKWevView, here a list of main issues to solve:

diegoreymendez commented 8 years ago

Custom fonts are now loading in the web view.

diegoreymendez commented 8 years ago

I'll be implementing native callbacks in a separate branch named feature/260-wkwebview-native-callbacks. That way we can either decide to merge them as part of this PR or in a separate one.

diegoreymendez commented 8 years ago

When integrating this into WPiOS we have these issues:

astralbodies commented 8 years ago

Editor - Migrating to WKWebView

diegoreymendez commented 8 years ago

@SergioEstevao - Changing back and forth from source mode to regular mode should be working fine now. I just applied a fix for the issues you were seeing.

diegoreymendez commented 8 years ago

Fixed the remaining issues we'd found. Will keep testing before creating a PR.

diegoreymendez commented 8 years ago

Fixed an issue with device rotation by removing an old hack that seems not to be necessary anymore. Ping @bummytime to confirm.

diegoreymendez commented 8 years ago

@rachelmcr, @bummytime: Added several fixes for the focusing issues and recovery. Also added a fix for the input accessory view issues when using an iPad.

More specifically:

diegoreymendez commented 8 years ago

Due to limitations in WKWebView, we're putting this idea on hold for now.

In particular we're not able to present images from private blogs, as there's no mechanism to add authentication cookies to those requests.

We'll keep this issue open and branch feature/260-wkwebview will be kept updated in case we find a solution for this problem.

More information: https://bugs.webkit.org/show_bug.cgi?id=140191

diegoreymendez commented 8 years ago

I'm dissociating myself from this task for the time being, and until cookies-adding support for WKWebView comes out.

bummytime commented 8 years ago

Good work on this @diegoreymendez! We will keep our fingers crossed for real cookie support soon...

koke commented 7 years ago

Just leaving a note that the webkit bug was resolved a couple weeks ago, so hopefully it'll land on iOS 11

nheagy commented 7 years ago

WKWebView now has a cookie managing API in iOS 11 😄