Needed some advice as i am writing my first iOS application,
1. what is the best way(simplest) to link an app to a database and does the database have to be SQLite (the databse will be external ie. linked via the internet)? i have used mySQL before in MAMP,
- I have read up on other post and they suggest complicated methods like via JSON etc, please provide a simple way and a book/guide/web site that could teach me your suggested method would be much appreciated too 🙂
SQLite is generally used for a local database (aka, on the device itself) through CoreData. But it seems like you have a remote MySQL database you want to connect to.
You should build some API that your iOS app talks to to get data from a database. Typically this is done over http which generates JSON in whatever server language of your choice (eg – python, ruby, php, etc).
For the iOS side, you’ll probably use Apple’s builtin features: NSURLConnection and NSJSONSerialization.