Databases on the iOS development-phonegap

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.