TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Project 22 - Detect-a-Beacon Code not running.

Forums > 100 Days of Swift

Something has changed in iOS 13 & 14 that is causing this not to work. I never get "Always" for granting access. I only get "Allow Once", "Allow While Using App" and "Don't Allow".

In didChangeAuthorization the if status == .authorizedAlways never gets called. Changing to .authorizedWhenInUse failed too. And it looks as if 'didChangeAuthorization status' has been retired and replaced with locationManagerDidChangeAuthorization.

Has anyone gotten this to work with 13 or 14?



Hey there!

After choosing "Allow While Using App", during a short period Apple will be keeping track of the app usage, and eventually will prompt the user with the following: “Keep Only While Using” or “Change to Always Allow.”

Nevertheless, even with the initial choosing of "Allow While Using App", your app should have no problems executing the beacon scanning.

You can try looking into my code - - and see if there are any differences that make your code not working properly. I know mine does, so it should be a fairly good reference.


Hacking with Swift is sponsored by Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.