eval(art);

MySQL.framework for iPhone

by Philippe Hausler on Jun.22, 2009, under Database, MySQL, Objective-C, iPhone/iPod Touch

As shipped XCode does not have any native method to compile Framework targets for iPhone, however for a project I have been working on there has been a very strong need to create an embedded framework suitable for iPhone/iPod Touch targets. So after a few days of tinkering with some internals of XCode I have created a method that will do just that!

Sincere I have gotten a decent amount of “buzz” for porting libmysqlclient to the iPhone OS; That is my first target to try out.

So with out further ado I present
MySQL Framework for iPhone

This is currently an alpha version of a full fleged framework for iPhone/iPod Touch 3.0. More documentation will be coming shortly. Do note this is not yet intended to be used for production software and is merely a proof of concept for embedded frameworks. Many features are missing from the obj-c abstraction for MySQL and the client is based on libmysqlclient 5.0.67 which is NOT up to date. However tests have shown capabilities of basic connectivity, authentication and queries to 4.1.22, 5.0.45 and 5.1.30 community editions (note no enterprise connections have been tested as of yet).

USAGE

In order to properly compile apps using the MySQL.framework a few preperation tasks need to be done.

Setup two targets, one specified for iPhone Device 3.0 and one specified for iPhone Simulator 3.0

Add the MySQL.framework from the Device folder as a framework to the Device target.

Likewise add the MySQL.framework from the Simulator folder as a framework to the  Simulator target.

Add a Copy Files Build Phase to both targets specified to the type Framework.

Add the respective frameworks to those Copy Files Phases.

Make sure that both targets are using Base SDK in order to allow the compile target to specify the SDK (and frameworks used).


Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...