You’re code works – but have you remembered to add the privacy usage descriptions to the info.plist file?
Add these two entries in the file with your own explanation in the value field, then it should popup in the simulator:
- Privacy – Location Always and When In Use Usage Description
- Privacy – Location When In Use Usage Description
CLICK HERE to find out more related problems solutions.