如何在iPad应用程序中将FMDB用作框架? [英] How can I use FMDB as a Framework in an iPad application?

查看:188
本文介绍了如何在iPad应用程序中将FMDB用作框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一款iPad应用程序。在一个阶段,有一系列滑块和按钮,当您按下按钮时,它会将滑块的值存储到表格中。首先,我需要使用SQLite来管理数据库。我发现了一个名为FMDB的项目,它是围绕SQLite for iPhone / Mac应用程序的包装器。我是iOS / Objective-c开发的新手,想知道如何将FMDB(或FMDB框架)添加到应用程序中。

I am currently developing an iPad application. At one stage, there is a series of sliders and buttons, when you press the button, it stores the value of the slider into a table. First of all, I need to use SQLite to manage the database. I found a project called FMDB that is a wrapper around SQLite for iPhone/Mac apps. I am pretty new to iOS/Objective-c developpment and want to know how you add FMDB (or an FMDB framework) into an app.

-Tristan

推荐答案

在此处下载FMDB源: https://github.com/ccgus/fmdb

Download the FMDB source here: https://github.com/ccgus/fmdb

要导入src文件夹,只需将其拖放到Xcode的项目导航器中即可。在提示符下,选中复制文件。然后,您可能希望将文件夹从src重命名为FMDB,并可能创建另一个文件夹以对外部库进行分类。

To import the src folder, you can just drag and drop it into Xcode's project navigator. On prompt, check to copy files in. You may then want to rename the folder from src to FMDB, and possibly create another folder to categorize external libraries as well.

Don不要忘记将libsqlite3.dylib包含到项目中。要执行此操作,请在导航器中单击您的项目,单击TARGETS下的项目名称,然后转到Build Phases选项卡。展开Link Binary With Libraries并单击+按钮将其添加进来。

Don't forget to include the libsqlite3.dylib into your project. To do this, click on your project in the navigator, click on your project's name under TARGETS, and go to Build Phases tab. Expand the Link Binary With Libraries and click the + button to add it in.

这篇关于如何在iPad应用程序中将FMDB用作框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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