BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>

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.


Save 50% in my Black Friday sale.

SAVE 50% To celebrate Black Friday, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

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.