使用预先存在的数据库创建PhoneGap iOS应用程序 [英] Creating a PhoneGap iOS app with a pre-existing database

查看:142
本文介绍了使用预先存在的数据库创建PhoneGap iOS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用PhoneGap(版本2.8.0)作为一个Medicine Finder的工作。在过去,我创建了一个Web版本的工具,使用jQuery Mobile和PHP访问远程SQL数据库。

I recently started working on an application that will serve as a Medicine Finder using PhoneGap (Version 2.8.0). In the past I created a web version of the tool which used jQuery Mobile and PHP to access a remote SQL database.

PhoneGap似乎是一个有吸引力的选择,将应用程序转换为可以部署到iPhone / Android应用商店,但要求我重写我以前的网络应用程序HTML5& JavaScript。因为大多数使用应用程序的人都会使用iPad上的互联网连接并不总是得到保证,所以应用程序的计划是使用预先填充的本地数据库。

PhoneGap seemed like an attractive choice for turning the application into something that I could deploy to the iPhone/Android app stores but required that I re-write my previous web app in HTML5 & JavaScript. Because a majority of the people using the app would be on an iPad where internet connectivity is not always guaranteed, the plan for the app was to use a pre-populated local database.

虽然应用程序的功能似乎很容易实现,似乎使用预先存在的本地数据库与PhoneGap不是那么简单。我花了15多个小时试图找到一个简单的方法来做到这一点没有成功。我知道在github上存在许多phonegap + sqlite插件,但是由于缺乏文档和与较新版本的PhoneGap不兼容,我无法让他们工作。

Although the functionality of the app seemed very simple to implement, it appears that using pre-existing local db with PhoneGap is not so trivial. I have spent 15+ hours trying to find an easy way to do this with no success. I am aware that numerous phonegap+sqlite plugins exist on github but due to a lack of documentation and incompatibility with newer versions of PhoneGap I was unable to get them to work.

如果有任何人有任何经验,我会真正感谢他们的投入。

If there is anybody that has any experience with this I would really appreciate their input.

另外 - 如果有必要,什么是最简单的工具,转换我的.sql数据库

ALSO - If necessary, what is the easiest tool for converting my .sql database (2 tables, one has around 360 entries the other has 20) into a SQLite database.

推荐答案

我已经升级了我的一个组织项目从phonegap 1.8到phonegap 3.0,并使用此插件进行SQLite处理

Well I've upgraded one of my organisations project from phonegap 1.8 to phonegap 3.0 and used this plugin for SQLite handling

插件链接

安装指南写得很好,如果正确,插件需要几分钟时间才能安装
指南

The installation guide is well written and if followed correctly, the plugin take minutes to get installed Guide

不确定转换器从SQL到SQLite

Not sure about the converter from SQL to SQLite

这篇关于使用预先存在的数据库创建PhoneGap iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆