GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

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?

Thanks!

3      

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 - https://github.com/DorianZet/100-Days-Of-Swift/tree/master/22-Project22 - 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.

3      

Hacking with Swift is sponsored by Proxyman.

SPONSORED Debug 10x faster with Proxyman. Your ultimate tool to capture HTTPs requests/ responses, natively built for iPhone and macOS. You’d be surprised how much you can learn about any system by watching what it does over the network.

Try Now!

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.