PhoneGap provided by the Local database function is not available, finally consult a master after using the Sqliteplugin plug-in to achieve. Much of the web is about how iOS plugins are programmed and rarely describes how to use plugins:
First, plug-in installation:
1, download, unzip, copy the following files:
The SQLitePlugin.h and sqliteplugin.m under the Cordova-sqliteplugin-master\src\ios directory are copied to the plugin directory of the PHONGGAP project.
Sqliteplugin.js in the Cordova-sqliteplugin-master\www directory, copied to the JS directory of the PHONEGAP project
2. Set up the project: in the Project build Phases tab, in the link Binary with libraries project, add one item: Libsqlite3.dylib.
3, compile, at this time should be able to pass.
Second, use:
Refer to <script>js/SQLitePlugin.js</script> in the page. Then follow the official instructions for the relevant SQL operation.
Https://github.com/millerjames01/Cordova-SQLitePlugin
Databases on the iOS development-phonegap