M6L13 : Are you Onboard?

Lesson 13 of Module 6 from the iOS Foundations course of CodeWithChris covers the set-up of the onboarding screens, and also adds the “Location Denied” view for when the user denies location access to the app.

What you get when you deny location services to an app that’s showing you your location.

The Little Bug … ah!

After yesterday’s incomprehensible error message that required extensive debugging, another one cropped up today.

Yes, there’s (yet another) little bug in Xcode. This time it’s the non-trivial fact that, having denied location access to the app, the simulator doesn’t allow you to change it back – because there’s no “Location Settings” in the Privacy section of the iPhone simulator.

Real iPhone (note “Location Services” tab)
Simulated iPhone (no “Location Services” tab)

The “solution” involves deleting the app from the simulator (or ‘Device > Erase All Content and Settings’) so that the app can be reinstalled afresh and ask whether you wish to permit location access again. Apparently, this setting has been missing from the simulator for quite some time.

As I near the end of this module, I wonder if these things were sent to try us. Or maybe Apple is being kind by introducing their own bugs to make us feel better when we make our own. That’d be a nice thought…