Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Brandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsFetching data with Swift from a MYSQL table on Godaddy Hosting
I am donating my time doing a app for a friends non profit to get some practice in. I created a simple MySQL table (3 columns/4 rows) on Godaddy Hosting for it. Its pretty simple, an admin app that will update the small database with current figures overwriting the previous while the main users app will keep them updated to those figures. My problem is that I can't seem to figure out the address for the http request or the API key is for the database. Where do I find them? I pretty much have the other features complete its just this that is giving me problems. The app needs to be used for an event two weekends from now.
1 Answer

Martin Wildfeuer
Courses Plus Student 11,071 PointsTo access a mySQL Database you typically need another layer in between: the API layer. You cannot access data of an mySQL database directly, these days it is quite common to use a REST API that mediates between the database and your app. That layer could be written in any language, this tutorial happens to do it in PHP.
Having said that, if you are not into backend development, you should probably look into services like firebase, wich is an example for MBAAS. They do provide an iOS SDK so you can easily connect both worlds, the backend and the frontend. Most of them provide their basic service for free, data plans for extended usage are available. You can also have a look at parse, which will be shut down beginning next year. They have open sourced their platform, though...
I'd suggest you do some research on this topic, I could write a thousand lines, it is such a complex thing.
Brandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsBrandon Mahoney
iOS Development with Swift Techdegree Graduate 30,149 PointsGreat thanks for the help. This will be my first time messing with the back end but that tutorial should help.