Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Add the cordova-plugin-wkwebview-engine plugin to your project in Cordova iOS platform. For detailed information on Cordova iOS platform, refer Cordova iOS platform guide.
  2. Add the cordova-plugin-wkwebviewhrfix plugin to the same project.
  3. Ensure that you use the latest canvas.hybrid.util.js file version.
  4. Ensure that you use the latest Hybrid.xml file version.
  5. Ensure that you use the latest CanvasIntellectPlugin.m file version.
  6. In the project search path, replace the existing CDVWKWebViewEngine.m with the latest CDVWKWebViewEngine.m.
  7. In the Cordova iOS platform, in the config.xml file, specify the preference name and value, as shown in the following code snippet:

    Code Block
    languagebashxml
    <preference name="WKWebViewOnly" value="true" />


  8. Replace each and every xmlhttprequest/jQuery request calls in the pre-login path to facilitate the calling of native library functions through the Canvas plugin. The following code snippet serves as a sample reference:

    Code Block
    languagebashxml
    var reqOptions = {
           method: "POST"
           , host: canvasHybridUtil.getServerIp()
           , path: canvasHybridUtil.getServerPath() + "PortalLoginServlet"
           , port: canvasHybridUtil.getServerPort()
           , headers: {
           "Content-type": "application/x-www-form-urlencoded"
           }
           , body: parameters
         };
         this.reqOptions = reqOptions;
         canvasHybridUtil.sendSecureHttpRequest(this, loginFailureCallback,  
         loginSuccessCallback);
         /**
         * @Method loginSuccessCallback
         * @description This method is success callback method for login request
         * @param successResponse
         * @return null
         */
        function loginSuccessCallback(successResponse) {
           validateLoginResponse(successResponse.body, uname);
        }
        /**
         * @Method loginFailureCallback
         * @description This method is failure callback method for login request 
         * @param successResponse
         * @return null
         */
        function loginFailureCallback(err) {
        showAlert(err);
        }