From the course: Swift 5: Protocol-Oriented Programming

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Integrating a fallback service

Challenge: Integrating a fallback service

From the course: Swift 5: Protocol-Oriented Programming

Start my 1-month free trial

Challenge: Integrating a fallback service

(gently chiming bells) - Web services are not guaranteed to function all of the time, they may fail for various reasons; such as timeout issues, or authentication problems. We can try to avoid this problem by using multiple services. If one service fails, we switch to another one. Your task is to enhance the weather app with such a Fallback Strategy. Editors, please remove the transition from the slides to this X code view. I added a new web service controller that allows us to fetch weather information using the weather stack API. The corresponding code, the birth structures can be found in the Jason Mappers Group. Not that I had to add the weather's tech domain to the app transport security exception domains. The free plan doesn't include SSL. There is HTTPS connections, and the iOS security policy denies HTTP connections by default. To access HTTP resources, we need to white list the given domain. Your task is to…

Contents