Using Swift in iOS to make an API request
We are currently developing a new native iOS mobile application to demonstrate various functionality. We took the decision to develop this particular application using Apple’s new programming language, Swift. For those unfamiliar with Swift it was released by Apple last year to work side-by-side with existing Objective-C code. The main aim of the new language are to be more concise with maintaining expressiveness. Currently there are a few gaps and things that aren’t as easy as they should be, but we’ve been very impressed given it’s age relative to other offerings.
As part of the development process we used Apple’s new Playgrounds to quickly try things out in Swift. One such thing we looked at was how to make a GET request to an API. Below is some example code we used to connect to a great up and coming football data api (football-data.org):
We’ll be launching the mobile application in the coming months, but if you would like an early demonstration of what we can offer then please let us know. Toffee Byte is happy to develop any native mobile application for you or your business.