Phonegap iOS + DOM Exception 18

I'm going to window.onerror "SECURITY_ERR: DOM Exception 18: An attempt was made to break through the user agent security policy." Every time I download the iOS PhoneGap app. The application uses local storage and webSQL. I disabled this error when I open my db using: db = window.openDatabase ("db", "1.0", "Test DB", 1000000);

I did not have this problem before, and my code has not changed - it just appeared now. I have reviewed iOS 5.1 web view storage errors and am worried that this might be due.

reference

+5
source share
2 answers

Apple iOS 5.1. , PhoneGap/Cordova: https://issues.apache.org/jira/browse/CB-347

+5

, .

try { 
if (!window.openDatabase) { 
        alert('not supported'); 
} else { 
        var shortName = 'WineDatabase'; 
        var version = '1.0'; 
        var displayName = 'PhoneGap Test Database'; 
        var maxSize = 655367; // in bytes 
        mydb = openDatabase(shortName, version, displayName, maxSize); 
    }
} catch(e) { 
// Error handling code goes here. 
if (e == INVALID_STATE_ERR) { 
        // Version number mismatch. 
        alert("Invalid database version."); 
} else { 
        alert("Unknown error "+e+"."); 
} 
return; 
} 

Phonegap ios.So, . , Blackberry phonegap ​​ , : datacable , SDCard. . ios. , Blackberry, .

+1

All Articles