5 Replies Latest reply on Jun 22, 2015 8:57 AM by Jon Tara

    Rhomobile and WKWebView

    bcd57e93-7e23-418b-a7ed-9ddb8ed95067

      Hi,

       

      With IOS8, Apple has released the WKWebView interface which contain some very useful improvements (such as JS engine optimizations) compared to the old UIWebView.

      But it seems that Rhomobile still uses UIWebView and I don't see any occurence of WKWebView on the master branch in GitHub.

      Is the upgrade from UIWebView to WKWebView is planned by the rhomobile dev team?

       

      Thanks,

       

      Louis

        • Re: Rhomobile and WKWebView
          Jon Tara

          It would certainly be a welcome addition, and I hope we can get this soon. But I note that PhoneGap doesn't have it yet, either, so may not be as easy as it seems on the surface.

           

          From what I have read about XCode7 and iOS9, though, I'll bet the Rhodes team will have their hands full dealing with build again. Every time Apple comes out with a new major iOS version, they throw curveballs that require extensive changes to the build system. There is a whole new way of dealing with dual 32/64-bit architecture for App Store submission. Now you will upload partly-compiled code in a neutral bitcode, and the App Store itself will compile that to machine code! (Presumably, there is a way to bypass that or complete the compile yourself for test.) But in any case, that big bundle of Rake scripts gets to be extensively modified yet again...

            • Re: Rhomobile and WKWebView
              bcd57e93-7e23-418b-a7ed-9ddb8ed95067

              Thanks for your answer Jon.

              Sure the devteam must be busy catching the Apple's curveballs .

              Anyway, i have implemented my own rhodes patch in order to replace the UIWebView with the new WKWebView. It seems to work in our context except for the javascript rhodes native API but we don't use it. If you want to have a look on, i have fork & branch here : louisatome/rhodes at wkwebview · GitHub. I make no guarantee that works in any context because i don't have a global knowledge of all the rhodes features but in our particular project everything seems to be OK and the JS code is like 3x faster

                • Re: Rhomobile and WKWebView
                  Jon Tara

                  Thank you so much for sharing this. I will certainly give it a try and give you some feedback!

                   

                  I have a little back-burner side project to make an app that you can use to browse a Karaoke songbook and then request to get in the queue to sing a song. (If the venue uses a certain Karaoke-show hosting software). It is perfect for trying to out on, as it deals with long lists, etc. (Of course, I do not use jQuery Mobile listview!)

                   

                  I also do not use the Javascript native API, so a good project to try it on. I do think I use some executeJavascript() so we will see how that part goes!

                   

                  Oh, I see you forked from 5.0.2? (Unsure, because RhoMobile has been inconsistent about updating 'version' file in the source...) Maybe I will help out and see if I can easily port it over to 5.1. But I can build my project with yours for a quick test.

                   

                  And this is a good reminder that I should publish my Bonjour service discovery native extension that I developed for that Karaoke app. It works well for iOS, and I've done the Android implementation for the built-in Android Bonjour. Android works well only for very new Android versions, because it is a recent API, and was buggy the first few versions. I need to add a third-party Bonjour library for older Android versions, but it is good enough for others to start exercising it.

                    • Re: Re: Rhomobile and WKWebView
                      bcd57e93-7e23-418b-a7ed-9ddb8ed95067

                      You're welcome but as i said before there may be some issues with my solution.

                      Yes i branch from 5.0.2 because we currently use the 5.0.30 version of rhodes and i think it is the related branch (or maybe not, the branches' name are a little bit messy ).

                       

                      Anyway if you want to give it a try, you just have to add the following configuration in the build.yml file (iphone section) :

                      iphone:
                           [...]
                           WKWebView: true
                      

                       

                      And deploy the app on an IOS8 device.

                        • Re: Rhomobile and WKWebView
                          Jon Tara
                          but as i said before there may be some issues with my solution.

                          That is why I will try it in a toy project, It's always good to have one that doesn't matter much, but also gives you incentive to try things. So, on my toy project, I try to stay on the cutting-edge versions, and make my mistakes there.

                           

                          Yea, 5.0.30 got 5.0.2 in the version file, and then when RhoMobile builds RhoMobile Suite, somebody types the version number into some secret console deep in the basement. I'll check the commit hash that you forked from to see what I'm working with.

                           

                          When I build a Rhodes Gem myself I always patch-up two things. The version file. And a dependency on an old JSON Gem that won't work with Ruby 2.x.