ios - Implementing WKWebView / Telerik on IBM MobileFirst Platform Foundation 7.1 Project -
the main objective here i'm trying achieve use wkwebview on ibm mobilefirst platform foundation 7.1 project instead of uiwebview. because of severe memory usage issue cause uiwebview.
i understand few points:
wkwebview implementation requires cordova 4.x
- however ibm mobilefirst platform foundation 7.1 supports till cordova 3.7.0
ibm mobilefirst platform foundation 8.0 using cordova 4.x
- upgrading ibm mobilefirst platform foundation 8.0 not option me @ moment, because effort required huge , project timeline not permit (8.0 deprecated lot of existing features have pass our testing phase during 7.1)
for that, found solution implement it, using telerik wkwebview supports wkwebview cordova 3.7.0 (https://github.com/telerik-verified-plugins/wkwebview)
things have done far:
- add telerik wkwebview no compilation issue
- make ibm mobile first initialisation logic @ appdelegate compatible telerik wkwebview's "appdelegate+wkwebviewpolyfill"
the changes made is,
ibm mobile first creates cdvviewcontroller , add rootviewcontroller after init successful
uiviewcontroller* rootviewcontroller = self.window.rootviewcontroller; // create cordova view controller cdvviewcontroller* cordovaviewcontroller = [[cdvviewcontroller alloc] init] ; cordovaviewcontroller.startpage = [[wl sharedinstance] mainhtmlfilepath]; // adjust cordova view controller view frame match parent view bounds cordovaviewcontroller.view.frame = rootviewcontroller.view.bounds; // display cordova view [rootviewcontroller addchildviewcontroller:cordovaviewcontroller]; [rootviewcontroller.view addsubview:cordovaviewcontroller.view]; [cordovaviewcontroller didmovetoparentviewcontroller:rootviewcontroller]; i change call telerik wkwebview's createwindowandstartwebserver
//uiviewcontroller* rootviewcontroller = self.window.rootviewcontroller; // create cordova view controller //cdvviewcontroller* cordovaviewcontroller = [[cdvviewcontroller alloc] init] ; //cordovaviewcontroller.startpage = [[wl sharedinstance] mainhtmlfilepath]; // adjust cordova view controller view frame match parent view bounds //cordovaviewcontroller.view.frame = rootviewcontroller.view.bounds; // display cordova view //[rootviewcontroller addchildviewcontroller:cordovaviewcontroller]; //[rootviewcontroller.view addsubview:cordovaviewcontroller.view]; //[cordovaviewcontroller didmovetoparentviewcontroller:rootviewcontroller]; [self createwindowandstartwebserver:true]; i have issue point correct path @ first('index.html'), made changes @ cdvviewcontroller.m -> loadsettings from
if (self.startpage == nil) { self.startpage = @"index.html"; } to
if (self.startpage == nil) { self.startpage = @"default/index.html"; } for that, i'm seeing white screen after ibm mobile first's "splash screen" without error.
any advice? solution?
Comments
Post a Comment