1

I have upgraded my Cordova app to Cordova iOS 4.0.1, as mentioned here. http://devgirl.org/2016/01/11/a-faster-hybrid-app-for-the-new-year/

But my app keep giving following error in iOS 9.1 after the splash-screen displayed.

screenshot of error

I upgraded Cordova and its plugins (added wkwebview-engine). And also added meta tag into index.html file and update config.xml as well. Error is throwing when initialising the database.

//// config.xml ////
<access origin="*" />
<allow-navigation href="http://acs.sdss.net/" />


//// Index.html ////
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; connect-src http://api.fixer.io">
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1" />
<link rel="stylesheet" href="css/mobile-angular-ui-base.min.css" />

///// This is where error is throwing /////
// Initialize the db, create if it does not exist
self.init = function () {
    try {
        self.db = window.openDatabase(DB_CONFIG.name, '0.1', 'database', 10 * 1024 * 1024);
    } catch (e) {
        alert(e);
        return;
    }

    angular.forEach(DB_CONFIG.tables, function (table) {
        var columns = [];

        angular.forEach(table.columns, function (column) {
            columns.push(column.name + ' ' + column.type);
        });

        var query = 'CREATE TABLE IF NOT EXISTS ' + table.name + ' (' + columns.join(',') + ')';
        self.query(query);
    });
};

Xcode console display that it is using "WKWebView" too. Please tell me if you need more information on this.

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.