0
votes

I am new to ionic cross-platform while running the ionic cross platform app for generating build I am facing following error.

DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/C234C014-5541-45C9-96A9-4D7B3E0AA4FA/Library/Cookies/Cookies.binarycookies 2016-10-15 14:55:26.568 HelloWorld[363:42830] Unbalanced calls to begin/end appearance transitions for . 2016-10-15 14:55:26.591 HelloWorld[363:42906] [FATAL] [WL_INIT] -[WLImpl initWL] in WLImpl.m:174 :: Init failure: Can't read checksum.js, The file name is invalid., (null). Reinstall the application and try again.

I used MFP SDK(plugin)

So guys kindly give some suggestion for taking build

Its is just a helloworld program with MPF SDK.

Downloaded the sample project generated by ionic here with some bugs. bugs fixed code here.

1
Did you try what the error suggested? 'Reinstall the application and try again.' - Aurora0001
Yes Aurora000, I uninstall and tried but no use - Anand3777
2016-10-15 14:55:26.432 HelloWorld[363:42830] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/C234C014-5541-45C9-96A9-4D7B3E0AA4FA/Library/Cookies/Cookies.binarycookies 2016-10-15 14:55:26.568 HelloWorld[363:42830] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x14ed59d90>. 2016-10-15 14:55:26.591 HelloWorld[363:42906] [FATAL] [WL_INIT] -[WLImpl initWL] in WLImpl.m:174 :: Init failure: Can't read checksum.js, The file name is invalid., (null). Reinstall the application and try again. - Anand3777
Used MFP SDK(plugin) - Anand3777
The information you've provided is not helpful. You need to provide your full implementation of the app so it could be debugged, and the steps you've followed. Mention which ionic version you're using... and again, the actual project so it could be debugged. - Idan Adar

1 Answers

1
votes

Since the links you've provided are of no use (the links lack permission to download.....), I suggest that you will follow these blog posts:

  1. Integrating MobileFirst Foundation 8.0 in Ionic-based apps
  2. Best Practices for building AngularJS apps with MobileFirst Foundation 8.0

Here is the basic premise:

  1. Install the following CLIs

    npm install -g mfpdev-cli npm install -g cordova ionic npm install -g cordova

  2. Create a New Ionic Project

    ionic start myApp blank

    Ionic automatically adds the Cordova iOS v3.8 plug-in, however MobileFirst Foundation v8.0 support Cordova iOS v4.0 and above. To overcome this, remove the iOS platform and re-add it. Change directory into your Ionic project and run:

    ionic platform remove ios ionic platform add ios@latest

    If you want to add the android platform, you can add it with:

    ionic platform add android@latest

  3. Add the MobileFirst Cordova SDK

    cordova plugin add cordova-plugin-mfp

    You can confirm the installed plug-ins by entering ionic plugin list

  4. Update Ionic Code

    Open the js/app.js file.

    The module is named starter.

    angular.module('starter', ['ionic'])

    The ng-app directive in the index.html file tells angular which code to run on the page.

    To link the view and the model of the app together, create a controller in the app.js file.

    .controller("mainCtrl", function($scope){ })

    The $scope service allows you to share variables and functions from the controller to the view.

    Go back to index.html.

    Add ng-controller to the body tag and include the mainCtrl name. This allows you to use the controller anywhere inside the body tag.

    ng-controller="mainCtrl"

  5. Register App on MobileFirst Server

    To enable the MobileFirst capabilities such as using the Mobile Browser Simulator to preview the application we need to add some JavaScript code to connect to the MobileFirst Server.

    Open app.js and enter the following at the bottom:

     function wlCommonInit() {
    console.log(">> wlCommonInit() ..." );  
    var serverUrl = WL.App.getServerUrl(function(success){
        console.log(success);
    }, function(fail){
        console.log(fail);
    });
    WLAuthorizationManager.obtainAccessToken().then(
        function (accessToken) {
          console.log(">> Success - Connected to MobileFirst Server");          
        },
        function (error) {
          console.log(">> Failed to connect to MobileFirst Server");  
          console.log(error);        
        }
    );
    

    };

  6. Register your app with your MobileFirst Server.

    mfpdev app register