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.
Making network requests
Network configuration
To add the previously mentioned two configurations, we need to follow these steps:
- Open the Info.plist file and click on the small + icon...