Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3653611F33 for ; Wed, 13 Aug 2014 20:53:06 +0000 (UTC) Received: (qmail 51994 invoked by uid 500); 13 Aug 2014 20:53:03 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 51953 invoked by uid 500); 13 Aug 2014 20:53:03 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 51208 invoked by uid 99); 13 Aug 2014 20:53:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2014 20:53:03 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shazron@gmail.com designates 209.85.192.41 as permitted sender) Received: from [209.85.192.41] (HELO mail-qg0-f41.google.com) (209.85.192.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2014 20:52:38 +0000 Received: by mail-qg0-f41.google.com with SMTP id q107so288128qgd.0 for ; Wed, 13 Aug 2014 13:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=aHg5SZmb+Kgbk+tr06CpgUCCYt/ldQxmeqHq6THLHCg=; b=m1Ia/2hMuNyKgEuMWZgKnNU/57Y4g3pytA7m0jSdvTpoZrxuQZQA/m4CRoL8R6c3oQ +dSnYyp6LeZH/+c6ajQlBxemdS2GGCW/AK2zL2SBHDnUIZ0wm933H9N/fecbdmd/4NqH tmNzCrz3TpCxyulDD9HUclkKOmJXmKk+tNC9wuvqlD6eaFHIh+m9RJVF66JYOtq/Zd73 c4W1C4+D+aVD9+0FvFwJmmGiTWB43K0flqezVFaO8rwTnvMUW5mCDGKgSbBNW+qZZzTy 4nuCc5Cb2vkaZQLWYuaU5KZWobeWMe0yVcbLliRUQUTV46SkC1iQNFXhi/R8Cpzs6tHm pALA== X-Received: by 10.140.96.85 with SMTP id j79mr10439560qge.5.1407963157152; Wed, 13 Aug 2014 13:52:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.43.229 with HTTP; Wed, 13 Aug 2014 13:51:57 -0700 (PDT) In-Reply-To: References: <1402791388.6855.0@smtp.gmail.com> From: Shazron Date: Wed, 13 Aug 2014 13:51:57 -0700 Message-ID: Subject: Re: WKWebView for iOS8 To: "dev@cordova.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Well, bad news, the workaround doesn't work. Nothing from a file:// url will load in a WKWebView in an iOS 8 beta 5 device. Assumption 1 below fails. Assumptions: 1. WKWebView can load resources from tmp / Documents / Library / Library/Caches 2. Can copy www folder in app bundle to tmp / Documents / Library / Library/Caches On Wed, Aug 13, 2014 at 11:18 AM, Shazron wrote: > Jesse had a great idea -- surely you are allowed to load from tmp or > Documents. Assuming I can copy off the app bundle, I would copy the > www folder into tmp or Documents, and load the index.html from there. > This is the Windows Phone Cordova approach I believe. > > Assumptions: > 1. WKWebView can load resources from tmp or Documents > 2. Can copy www folder in app bundle to tmp or Documents > > On Wed, Aug 13, 2014 at 11:07 AM, Shazron wrote: >> Bad news - local file loading in a WKWebView is borked ever since iOS 8 beta 4. >> >> Not sure if there is some sort of new security model for loading local >> files in WKWebView >= beta 4.WKWebView cannot load local files in its >> app bundle anymore you get a blank screen, when on the device. >> Simulator seems fine. I found this out when updating my beta 3 iPhone >> to beta 5 yesterday. I downgraded back, but this beta unfortunately >> expires in 7 days on Aug 21, 2014. >> >> 1. https://devforums.apple.com/message/1011583 >> 2. http://stackoverflow.com/questions/24882834/wkwebview-not-working-in-ios-8-beta-4/24922619#24922619 >> 3. https://issues.apache.org/jira/browse/CB-7288 >> 4. rdar://problem/17761459 >> 5. rdar://problem/17835098 >> >> >> On Wed, Jul 16, 2014 at 12:05 PM, Marc Weiner wrote: >>> Same! Shazron, you're awesome!! >>> >>> >>> On Wed, Jul 16, 2014 at 2:08 PM, Carlos Santana >>> wrote: >>> >>>> Happy to see good news when returning from vacation. :-) >>>> >>>> >>>> On Mon, Jul 7, 2014 at 10:33 PM, Ally Ogilvie wrote: >>>> >>>> > I'm usually an observer here but.. the urge to post was too great! >>>> > >>>> > >>>> http://seattlesportsnet.files.wordpress.com/2013/11/anchorman-celebration-gif.gif >>>> > >>>> > Thanks for the research Shaz. >>>> > >>>> > On Tue, Jul 8, 2014 at 4:57 AM, Tommy Williams >>>> wrote: >>>> > >>>> > > Yesssss!!! >>>> > > On 8 Jul 2014 05:52, "Shazron" wrote: >>>> > > >>>> > > > Good news: https://twitter.com/shazron/status/486235098715394048 >>>> > > > >>>> > > > On Fri, Jun 27, 2014 at 3:46 PM, Shazron wrote: >>>> > > > > Broke the iOS 8 issue into sub-tasks: >>>> > > > > https://issues.apache.org/jira/browse/CB-7043 >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > On Mon, Jun 16, 2014 at 8:20 AM, Shazron >>>> wrote: >>>> > > > >> Haven't yet - but from what I read - no. Something about requests >>>> > > being >>>> > > > out >>>> > > > >> of process >>>> > > > >> >>>> > > > >> >>>> > > > >> On Monday, June 16, 2014, Andrew Grieve >>>> > wrote: >>>> > > > >>> >>>> > > > >>> Awesome. >>>> > > > >>> >>>> > > > >>> Shaz (or anyone else), curious if you've tested yet to see if the >>>> > > > >>> whitelist >>>> > > > >>> still works with WKWebView? (e.g. does it go through >>>> > NSURLProtocol?) >>>> > > > >>> >>>> > > > >>> >>>> > > > >>> On Sat, Jun 14, 2014 at 8:16 PM, tommy-carlos williams >>>> > > > >>> >>>> > > > >>> wrote: >>>> > > > >>> >>>> > > > >>> > This looks promising. >>>> > > > >>> > >>>> > > > >>> > Thanks for the update, Shazron. >>>> > > > >>> > >>>> > > > >>> > - tommy >>>> > > > >>> > >>>> > > > >>> > >>>> > > > >>> > On Sun, Jun 15, 2014 at 7:48 AM, Shazron >>>> > > wrote: >>>> > > > >>> > >>>> > > > >>> >> Rev log: http://trac.webkit.org/log/trunk/Source/WebKit2/ >>>> > > > >>> >> UIProcess/API/Cocoa/WKWebView.mm >>>> > > > >>> >> for potential WKWebView updates in beta 2. >>>> > > > >>> >> >>>> > > > >>> >> On Sat, Jun 14, 2014 at 2:46 PM, Shazron >>>> > > wrote: >>>> > > > >>> >> >>>> > > > >>> >>> Some potential good news. Updated 4 days ago, hopefully its >>>> in >>>> > > > beta >>>> > > > >>> >>> 2: >>>> > > > >>> >>> http://trac.webkit.org/changeset/169765 >>>> > > > >>> >>> >>>> > > > >>> >>> "Add -[WKWebView evaluateJavaScript:completionHandler:]" >>>> > > > >>> >>> >>>> > > > >>> >>> Updated: https://issues.apache.org/jira/browse/CB-6884 >>>> > > > >>> >>> >>>> > > > >>> >>> >>>> > > > >>> >>> On Sat, Jun 7, 2014 at 10:06 PM, Carlos Santana >>>> > > > >>> >>> >>>> > > > >>> >>> wrote: >>>> > > > >>> >>> >>>> > > > >>> >>>> ok, was a bit confuse with api doc, I assumed that there >>>> was >>>> > a >>>> > > > way >>>> > > > >>> >>>> to >>>> > > > >>> >>>> specify a time other than documentstart, documentend, and >>>> no >>>> > > > passing >>>> > > > >>> >>>> something will do it immediately. >>>> > > > >>> >>>> >>>> > > > >>> >>>> Will open a radar too, we need wkwebview to officialy >>>> support >>>> > > for >>>> > > > >>> >>>> objc->js, >>>> > > > >>> >>>> postMessage seems kind of half working if only can do >>>> > js->objc >>>> > > > >>> >>>> >>>> > > > >>> >>>> >>>> > > > >>> >>>> On Sat, Jun 7, 2014 at 10:48 PM, Shazron < >>>> shazron@gmail.com> >>>> > > > wrote: >>>> > > > >>> >>>> >>>> > > > >>> >>>> No it's not. That is precisely what we discussed, it's the >>>> > > > >>> >>>> limitation >>>> > > > >>> >>>>> in >>>> > > > >>> >>>>> WKUserScript. >>>> > > > >>> >>>>> >>>> > > > >>> >>>>> On Saturday, June 7, 2014, Carlos Santana < >>>> > > csantana23@gmail.com >>>> > > > > >>>> > > > >>> >>>>> wrote: >>>> > > > >>> >>>>> >>>> > > > >>> >>>>> > Shaz >>>> > > > >>> >>>>> > I think the closest replacement is [1] - >>>> > > > (void)addUserScript:( >>>> > > > >>> >>>>> > WKUserScript *)*userScript * >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> > I have not tried my self, but looking forward on helping >>>> > > out. >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> > [1]: >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> https://developer.apple.com/library/prerelease/ios/ >>>> > > > >>> >>>>> documentation/WebKit/Reference/WKUserContentController_Ref/ >>>> > > > >>> >>>>> >>>> > > > >>> >>>>> >>>> > > > >>>> index.html#//apple_ref/occ/instm/WKUserContentController/addUserScript >>>> > > > >>> >>>>> > : >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> > On Fri, Jun 6, 2014 at 12:47 AM, Shazron < >>>> > shazron@gmail.com >>>> > > > >>>> > > > >>> >>>>> wrote: >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> > > No use in polling if we can't write anything back to >>>> JS >>>> > > from >>>> > > > >>> >>>>> Obj-C. >>>> > > > >>> >>>>> > > >>>> > > > >>> >>>>> > > There's a private API to do so: >>>> > > > >>> >>>>> > > >>>> > > > >>> >>>>> > > >>>> > > > >>> >>>>> > >>>> > > > >>> >>>>> https://github.com/WebKit/webkit/commit/ >>>> > > > >>> >>>>> adb4c60064b38b5ab3d6e78422325f35f0b7fe2b >>>> > > > >>> >>>>> > > only landed a few months ago, we'll have to do some >>>> > > advocacy >>>> > > > >>> >>>>> through >>>> > > > >>> >>>>> > > whatever channels we have to get it in the public API >>>> > > > (radars, >>>> > > > >>> >>>>> > > connections), since it is a deficiency in their API >>>> > losing >>>> > > > >>> >>>>> something >>>> > > > >>> >>>>> > > like stringByEvaluatingJavaScriptFromString >>>> > > > >>>> > > >>>> > >>>> > >>>> > >>>> > -- >>>> > Ally Ogilvie >>>> > Lead Developer - MobDev. | Wizcorp Inc. >>>> > ------------------------------ >>>> > TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website >>>> > | Twitter | >>>> > Facebook >>>> > | LinkedIn >>>> > >>>> > >>>> >>>> >>>> >>>> -- >>>> Carlos Santana >>>> >>>>