Making network requests

To get our app to communicate with the internet, we need to make a few changes. By default, in the newer version of the iOS, HTTP network requests that are not secure as HTTPs are blocked unless we explicitly tell them to allow it. Since we will be making network requests to our Vapor app, which is running locally as HTTP and not HTTPs, we need to set this in the Info.plist file of the iOS project. We will also add one more configuration to store the base URL of our Vapor server in this Info.plist, so we can reference it from one place.

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.