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.
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With