Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Xcode connecting to MySQL database

I'm currently making an iOS App for my school, and have no previous experience with iOS programming. However, I do have experience with HTML/PHP/MySQL.

Currently we have a basic tab bar application with 5 tabs at the bottom. Obviously, since this is an app for a school, it needs to be dynamic and hopefully we can set something up to connect to a database and retrieve school lunch menus, and news.

I know how to connect to a database normally with PHP, but I have no idea how to do it using the current version of Xcode. I've done research and apparently I need to use a webservice and json to safely get the information from the database.

Does anyone have any links for me to get started, because I have no experience at all with this program. I don't need to be spoonfed, but a point in the right direction would help. I really can't find any links for this new version of Xcode.

like image 230
Hunter Harris Avatar asked Nov 15 '12 16:11

Hunter Harris


People also ask

Can I use MySQL in Xcode?

So yes - you need to set up a website/server with a database that has a web page that generates JSON code. Then have the xcode send a web request to the server/webpage, store the JSON code in a variable, and then use whatever method xcodes have to use/manipulate the JSON data.

Can I use MySQL with Swift?

Well, now you can. MySQLDriver for Swift is a native driver, written in Swift programming language. Using this driver you can connect directly to a MySQL Database Server from your Swift code. You can use it on a Mac, iOS Device and Linux.

Can we use SQL in Xcode?

All replies. You can use the C-Interface routines to pass SQL commands to a Database with X-Code - all of the Database programs have C and Java libraries for that purpose.

Can I use MySQL on iPhone?

You can connect your iPhone to your MySQL database using an iPhone MySQL client. Several such clients are available through the App Store. Flipper, iMy and the MySQL Database Client are all MySQL clients for the iPhone.


1 Answers

Here are two great tutorials that helped me a lot

How To Write A Simple PHP/MySQL Web Service for an iOS App

How to Write an iOS App That Uses a Web Service

like image 84
u.gen Avatar answered Nov 01 '22 04:11

u.gen