PhotoLibrary access .notDetermined, when denying then enablingiPad remembering camera permissions after delete—how to clear?How can I make a UITextField move up when the keyboard is present - on starting to edit?Status bar and navigation bar appear over my view's bounds in iOS 7iOS App crashes when user denies permission to Photos after Move & Scale in UIImagePickerControllerPhotos Framework iOS 8 : change permission in settings app is not taken into account until I restart my appI am trying to allow the user to take an image and to save it to the photos albumMy app keep deny the access to contacts iOS - SwiftIssue with access camera after denied the cameraDoes AVCaptureDevice.requestAccessForMediaType only work for undetermined authorization status?Not able to save google drive videos to photo galleryHow to go to settings directly if the permission to access photo library is denied in swift
TeX truncating output of showbox command
Are there objective criteria for classifying consonance v. dissonance?
What 68-pin connector is this on my 2.5" solid state drive?
Can derivatives be defined as anti-integrals?
Permutations in Disguise
Has Dumbledore ever scolded Harry?
Is it possible to format a USB from a live USB?
Meaning of Swimming their horses
Impossible Scrabble Words
How to publish superseding results without creating enemies
Unable to find solution to 6 simultaneous equations
Make 2019 with single digits
Planar regular languages
Why don't airports use arresting gears to recover energy from landing passenger planes?
Access parent controller attribute from Visual force component
Why don't Wizards use wrist straps to protect against disarming charms?
How to give my students a straightedge instead of a ruler
Output a Super Mario Image
What would happen if Protagoras v Euathlus were heard in court today?
Would it be unbalanced to increase a druid's number of uses of Wild Shape based on level?
Is there a tool to measure the "maturity" of a code in Git?
What's the benefit of prohibiting the use of techniques/language constructs that have not been taught?
Why is the year in this ISO timestamp not 2019?
Building Truncatable Primes using Nest(List), While, Fold
PhotoLibrary access .notDetermined, when denying then enabling
iPad remembering camera permissions after delete—how to clear?How can I make a UITextField move up when the keyboard is present - on starting to edit?Status bar and navigation bar appear over my view's bounds in iOS 7iOS App crashes when user denies permission to Photos after Move & Scale in UIImagePickerControllerPhotos Framework iOS 8 : change permission in settings app is not taken into account until I restart my appI am trying to allow the user to take an image and to save it to the photos albumMy app keep deny the access to contacts iOS - SwiftIssue with access camera after denied the cameraDoes AVCaptureDevice.requestAccessForMediaType only work for undetermined authorization status?Not able to save google drive videos to photo galleryHow to go to settings directly if the permission to access photo library is denied in swift
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
If I deny at first, then go to settings and allow in settings, in both cases the status is notDetermined, instead of denied then authorized.
Why is that happening?
It doesn't save the image when i click "Don't allow", but status becomes .notDetermined not .denied .
It saves, after i go to settings->Photos, uncheck "Never" and check "Add Photos Only". But the status stays .notDetermined, does not become .authorized
func save()
guard let image = imageView.image else return
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil)
let status = PHPhotoLibrary.authorizationStatus()
switch status
case .authorized:
print("authorized")
return
case .notDetermined:
print("not determined")
case .denied, .restricted:
print("denied or restricted")
//please go to settings and allow access
promptToSettings()
I am asking permission to save an image to photo library.
When the first time the user tries to save, he gets asked: "App would like to add to Photos" "Don't Allow" "Ok"
If the user denied then tried to save again,i want to check and if the status is .denied, prompt the user to go to settings and allow.
But the code goes to .notDetermined block when the user does not give access the first time. It stays .notDetermined even after in settings the user allows access.
ios swift
add a comment
|
If I deny at first, then go to settings and allow in settings, in both cases the status is notDetermined, instead of denied then authorized.
Why is that happening?
It doesn't save the image when i click "Don't allow", but status becomes .notDetermined not .denied .
It saves, after i go to settings->Photos, uncheck "Never" and check "Add Photos Only". But the status stays .notDetermined, does not become .authorized
func save()
guard let image = imageView.image else return
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil)
let status = PHPhotoLibrary.authorizationStatus()
switch status
case .authorized:
print("authorized")
return
case .notDetermined:
print("not determined")
case .denied, .restricted:
print("denied or restricted")
//please go to settings and allow access
promptToSettings()
I am asking permission to save an image to photo library.
When the first time the user tries to save, he gets asked: "App would like to add to Photos" "Don't Allow" "Ok"
If the user denied then tried to save again,i want to check and if the status is .denied, prompt the user to go to settings and allow.
But the code goes to .notDetermined block when the user does not give access the first time. It stays .notDetermined even after in settings the user allows access.
ios swift
Check here - developer.apple.com/documentation/photokit/…
– Amir Khan
Mar 28 at 12:20
@Anna Oriova, Did you quit and launch the app or launch it from background to read the authorizationStatus after changing the permission to allow / denied?
– Anand
Mar 28 at 16:25
@Anand I did both ways.
– Anna Orlova
Mar 28 at 17:11
I tested the above code. whenever the permission is changed, the authorizationStatus gets printed correctly for me. It did not print "Not Determined" always as you mentioned. I can think of only one scenario here. Are you by any chance having two apps with same display name and different bundle id installed in the same device? (Actually this is possible. One will dev signed and another can be inhouse signed.) If that is the case, there is a chance that you change permission to one app and see the status in another app. Just a thought..
– Anand
Mar 29 at 5:56
add a comment
|
If I deny at first, then go to settings and allow in settings, in both cases the status is notDetermined, instead of denied then authorized.
Why is that happening?
It doesn't save the image when i click "Don't allow", but status becomes .notDetermined not .denied .
It saves, after i go to settings->Photos, uncheck "Never" and check "Add Photos Only". But the status stays .notDetermined, does not become .authorized
func save()
guard let image = imageView.image else return
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil)
let status = PHPhotoLibrary.authorizationStatus()
switch status
case .authorized:
print("authorized")
return
case .notDetermined:
print("not determined")
case .denied, .restricted:
print("denied or restricted")
//please go to settings and allow access
promptToSettings()
I am asking permission to save an image to photo library.
When the first time the user tries to save, he gets asked: "App would like to add to Photos" "Don't Allow" "Ok"
If the user denied then tried to save again,i want to check and if the status is .denied, prompt the user to go to settings and allow.
But the code goes to .notDetermined block when the user does not give access the first time. It stays .notDetermined even after in settings the user allows access.
ios swift
If I deny at first, then go to settings and allow in settings, in both cases the status is notDetermined, instead of denied then authorized.
Why is that happening?
It doesn't save the image when i click "Don't allow", but status becomes .notDetermined not .denied .
It saves, after i go to settings->Photos, uncheck "Never" and check "Add Photos Only". But the status stays .notDetermined, does not become .authorized
func save()
guard let image = imageView.image else return
UIImageWriteToSavedPhotosAlbum(image, self, nil, nil)
let status = PHPhotoLibrary.authorizationStatus()
switch status
case .authorized:
print("authorized")
return
case .notDetermined:
print("not determined")
case .denied, .restricted:
print("denied or restricted")
//please go to settings and allow access
promptToSettings()
I am asking permission to save an image to photo library.
When the first time the user tries to save, he gets asked: "App would like to add to Photos" "Don't Allow" "Ok"
If the user denied then tried to save again,i want to check and if the status is .denied, prompt the user to go to settings and allow.
But the code goes to .notDetermined block when the user does not give access the first time. It stays .notDetermined even after in settings the user allows access.
ios swift
ios swift
edited Mar 28 at 13:19
Anna Orlova
asked Mar 28 at 12:19
Anna OrlovaAnna Orlova
524 bronze badges
524 bronze badges
Check here - developer.apple.com/documentation/photokit/…
– Amir Khan
Mar 28 at 12:20
@Anna Oriova, Did you quit and launch the app or launch it from background to read the authorizationStatus after changing the permission to allow / denied?
– Anand
Mar 28 at 16:25
@Anand I did both ways.
– Anna Orlova
Mar 28 at 17:11
I tested the above code. whenever the permission is changed, the authorizationStatus gets printed correctly for me. It did not print "Not Determined" always as you mentioned. I can think of only one scenario here. Are you by any chance having two apps with same display name and different bundle id installed in the same device? (Actually this is possible. One will dev signed and another can be inhouse signed.) If that is the case, there is a chance that you change permission to one app and see the status in another app. Just a thought..
– Anand
Mar 29 at 5:56
add a comment
|
Check here - developer.apple.com/documentation/photokit/…
– Amir Khan
Mar 28 at 12:20
@Anna Oriova, Did you quit and launch the app or launch it from background to read the authorizationStatus after changing the permission to allow / denied?
– Anand
Mar 28 at 16:25
@Anand I did both ways.
– Anna Orlova
Mar 28 at 17:11
I tested the above code. whenever the permission is changed, the authorizationStatus gets printed correctly for me. It did not print "Not Determined" always as you mentioned. I can think of only one scenario here. Are you by any chance having two apps with same display name and different bundle id installed in the same device? (Actually this is possible. One will dev signed and another can be inhouse signed.) If that is the case, there is a chance that you change permission to one app and see the status in another app. Just a thought..
– Anand
Mar 29 at 5:56
Check here - developer.apple.com/documentation/photokit/…
– Amir Khan
Mar 28 at 12:20
Check here - developer.apple.com/documentation/photokit/…
– Amir Khan
Mar 28 at 12:20
@Anna Oriova, Did you quit and launch the app or launch it from background to read the authorizationStatus after changing the permission to allow / denied?
– Anand
Mar 28 at 16:25
@Anna Oriova, Did you quit and launch the app or launch it from background to read the authorizationStatus after changing the permission to allow / denied?
– Anand
Mar 28 at 16:25
@Anand I did both ways.
– Anna Orlova
Mar 28 at 17:11
@Anand I did both ways.
– Anna Orlova
Mar 28 at 17:11
I tested the above code. whenever the permission is changed, the authorizationStatus gets printed correctly for me. It did not print "Not Determined" always as you mentioned. I can think of only one scenario here. Are you by any chance having two apps with same display name and different bundle id installed in the same device? (Actually this is possible. One will dev signed and another can be inhouse signed.) If that is the case, there is a chance that you change permission to one app and see the status in another app. Just a thought..
– Anand
Mar 29 at 5:56
I tested the above code. whenever the permission is changed, the authorizationStatus gets printed correctly for me. It did not print "Not Determined" always as you mentioned. I can think of only one scenario here. Are you by any chance having two apps with same display name and different bundle id installed in the same device? (Actually this is possible. One will dev signed and another can be inhouse signed.) If that is the case, there is a chance that you change permission to one app and see the status in another app. Just a thought..
– Anand
Mar 29 at 5:56
add a comment
|
1 Answer
1
active
oldest
votes
I downloaded your code and ran it. I was able to experience whatever you said. It always returned Not Determined status.
I did a little bit analysis on your code further. Please find my observation below.
- In your current code, "PHPhotoLibrary.requestAuthorization" method is not called before reading the authorization status using "PHPhotoLibrary.authorizationStatus" method.
- Though "UIImageWriteToSavedPhotosAlbum" in Save method triggers a Photos app permission pop up, it does not help here completely.
- So, I called "askForAccessAgain" method in ViewDidLoad method in order to get the permission using "PHPhotoLibrary.requestAuthorization" method first.
- After that, whenever i saved the photos using Save method, it returned the correct status, let it be either "Authorized" or "Denied".
- If I choose "Never" and "Allow Photos Only", it returned "Denied or Restricted" status. When "Read and Write" is chosen, "authorized" is returned.
So, it looks like, We need to call "PHPhotoLibrary.requestAuthorization" method to get the permission first instead of relying on other Photo access methods ( like UIImageWriteToSavedPhotosAlbum) for getting the permission. Only then, correct status is returned by "PHPhotoLibrary.authorizationStatus".
One more addition info:
App Permissions are retained even after deleting the app and reinstalling it. Just take a look on this as well. It might help you in troubleshooting similar issues in future.
iPad remembering camera permissions after delete—how to clear?
Please let me know if this has resolved your issues.
Thank you. I am marking this as best answer, because even after much searching non of the articles made it clear that UIImageWriteToSavedPhotosAlbum is not reliable on this aspect.I read the link that you provided, thank you. It seems that even if the 'status' after not allowing shows right like this(denied) , and goes to denied block, it relies on app permission in settings and still saves the photo. So no luck relying on this status for checking if the user needs prompt or not.
– Anna Orlova
Mar 30 at 18:28
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397459%2fphotolibrary-access-notdetermined-when-denying-then-enabling%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I downloaded your code and ran it. I was able to experience whatever you said. It always returned Not Determined status.
I did a little bit analysis on your code further. Please find my observation below.
- In your current code, "PHPhotoLibrary.requestAuthorization" method is not called before reading the authorization status using "PHPhotoLibrary.authorizationStatus" method.
- Though "UIImageWriteToSavedPhotosAlbum" in Save method triggers a Photos app permission pop up, it does not help here completely.
- So, I called "askForAccessAgain" method in ViewDidLoad method in order to get the permission using "PHPhotoLibrary.requestAuthorization" method first.
- After that, whenever i saved the photos using Save method, it returned the correct status, let it be either "Authorized" or "Denied".
- If I choose "Never" and "Allow Photos Only", it returned "Denied or Restricted" status. When "Read and Write" is chosen, "authorized" is returned.
So, it looks like, We need to call "PHPhotoLibrary.requestAuthorization" method to get the permission first instead of relying on other Photo access methods ( like UIImageWriteToSavedPhotosAlbum) for getting the permission. Only then, correct status is returned by "PHPhotoLibrary.authorizationStatus".
One more addition info:
App Permissions are retained even after deleting the app and reinstalling it. Just take a look on this as well. It might help you in troubleshooting similar issues in future.
iPad remembering camera permissions after delete—how to clear?
Please let me know if this has resolved your issues.
Thank you. I am marking this as best answer, because even after much searching non of the articles made it clear that UIImageWriteToSavedPhotosAlbum is not reliable on this aspect.I read the link that you provided, thank you. It seems that even if the 'status' after not allowing shows right like this(denied) , and goes to denied block, it relies on app permission in settings and still saves the photo. So no luck relying on this status for checking if the user needs prompt or not.
– Anna Orlova
Mar 30 at 18:28
add a comment
|
I downloaded your code and ran it. I was able to experience whatever you said. It always returned Not Determined status.
I did a little bit analysis on your code further. Please find my observation below.
- In your current code, "PHPhotoLibrary.requestAuthorization" method is not called before reading the authorization status using "PHPhotoLibrary.authorizationStatus" method.
- Though "UIImageWriteToSavedPhotosAlbum" in Save method triggers a Photos app permission pop up, it does not help here completely.
- So, I called "askForAccessAgain" method in ViewDidLoad method in order to get the permission using "PHPhotoLibrary.requestAuthorization" method first.
- After that, whenever i saved the photos using Save method, it returned the correct status, let it be either "Authorized" or "Denied".
- If I choose "Never" and "Allow Photos Only", it returned "Denied or Restricted" status. When "Read and Write" is chosen, "authorized" is returned.
So, it looks like, We need to call "PHPhotoLibrary.requestAuthorization" method to get the permission first instead of relying on other Photo access methods ( like UIImageWriteToSavedPhotosAlbum) for getting the permission. Only then, correct status is returned by "PHPhotoLibrary.authorizationStatus".
One more addition info:
App Permissions are retained even after deleting the app and reinstalling it. Just take a look on this as well. It might help you in troubleshooting similar issues in future.
iPad remembering camera permissions after delete—how to clear?
Please let me know if this has resolved your issues.
Thank you. I am marking this as best answer, because even after much searching non of the articles made it clear that UIImageWriteToSavedPhotosAlbum is not reliable on this aspect.I read the link that you provided, thank you. It seems that even if the 'status' after not allowing shows right like this(denied) , and goes to denied block, it relies on app permission in settings and still saves the photo. So no luck relying on this status for checking if the user needs prompt or not.
– Anna Orlova
Mar 30 at 18:28
add a comment
|
I downloaded your code and ran it. I was able to experience whatever you said. It always returned Not Determined status.
I did a little bit analysis on your code further. Please find my observation below.
- In your current code, "PHPhotoLibrary.requestAuthorization" method is not called before reading the authorization status using "PHPhotoLibrary.authorizationStatus" method.
- Though "UIImageWriteToSavedPhotosAlbum" in Save method triggers a Photos app permission pop up, it does not help here completely.
- So, I called "askForAccessAgain" method in ViewDidLoad method in order to get the permission using "PHPhotoLibrary.requestAuthorization" method first.
- After that, whenever i saved the photos using Save method, it returned the correct status, let it be either "Authorized" or "Denied".
- If I choose "Never" and "Allow Photos Only", it returned "Denied or Restricted" status. When "Read and Write" is chosen, "authorized" is returned.
So, it looks like, We need to call "PHPhotoLibrary.requestAuthorization" method to get the permission first instead of relying on other Photo access methods ( like UIImageWriteToSavedPhotosAlbum) for getting the permission. Only then, correct status is returned by "PHPhotoLibrary.authorizationStatus".
One more addition info:
App Permissions are retained even after deleting the app and reinstalling it. Just take a look on this as well. It might help you in troubleshooting similar issues in future.
iPad remembering camera permissions after delete—how to clear?
Please let me know if this has resolved your issues.
I downloaded your code and ran it. I was able to experience whatever you said. It always returned Not Determined status.
I did a little bit analysis on your code further. Please find my observation below.
- In your current code, "PHPhotoLibrary.requestAuthorization" method is not called before reading the authorization status using "PHPhotoLibrary.authorizationStatus" method.
- Though "UIImageWriteToSavedPhotosAlbum" in Save method triggers a Photos app permission pop up, it does not help here completely.
- So, I called "askForAccessAgain" method in ViewDidLoad method in order to get the permission using "PHPhotoLibrary.requestAuthorization" method first.
- After that, whenever i saved the photos using Save method, it returned the correct status, let it be either "Authorized" or "Denied".
- If I choose "Never" and "Allow Photos Only", it returned "Denied or Restricted" status. When "Read and Write" is chosen, "authorized" is returned.
So, it looks like, We need to call "PHPhotoLibrary.requestAuthorization" method to get the permission first instead of relying on other Photo access methods ( like UIImageWriteToSavedPhotosAlbum) for getting the permission. Only then, correct status is returned by "PHPhotoLibrary.authorizationStatus".
One more addition info:
App Permissions are retained even after deleting the app and reinstalling it. Just take a look on this as well. It might help you in troubleshooting similar issues in future.
iPad remembering camera permissions after delete—how to clear?
Please let me know if this has resolved your issues.
answered Mar 30 at 14:59
AnandAnand
1,1532 gold badges12 silver badges20 bronze badges
1,1532 gold badges12 silver badges20 bronze badges
Thank you. I am marking this as best answer, because even after much searching non of the articles made it clear that UIImageWriteToSavedPhotosAlbum is not reliable on this aspect.I read the link that you provided, thank you. It seems that even if the 'status' after not allowing shows right like this(denied) , and goes to denied block, it relies on app permission in settings and still saves the photo. So no luck relying on this status for checking if the user needs prompt or not.
– Anna Orlova
Mar 30 at 18:28
add a comment
|
Thank you. I am marking this as best answer, because even after much searching non of the articles made it clear that UIImageWriteToSavedPhotosAlbum is not reliable on this aspect.I read the link that you provided, thank you. It seems that even if the 'status' after not allowing shows right like this(denied) , and goes to denied block, it relies on app permission in settings and still saves the photo. So no luck relying on this status for checking if the user needs prompt or not.
– Anna Orlova
Mar 30 at 18:28
Thank you. I am marking this as best answer, because even after much searching non of the articles made it clear that UIImageWriteToSavedPhotosAlbum is not reliable on this aspect.I read the link that you provided, thank you. It seems that even if the 'status' after not allowing shows right like this(denied) , and goes to denied block, it relies on app permission in settings and still saves the photo. So no luck relying on this status for checking if the user needs prompt or not.
– Anna Orlova
Mar 30 at 18:28
Thank you. I am marking this as best answer, because even after much searching non of the articles made it clear that UIImageWriteToSavedPhotosAlbum is not reliable on this aspect.I read the link that you provided, thank you. It seems that even if the 'status' after not allowing shows right like this(denied) , and goes to denied block, it relies on app permission in settings and still saves the photo. So no luck relying on this status for checking if the user needs prompt or not.
– Anna Orlova
Mar 30 at 18:28
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397459%2fphotolibrary-access-notdetermined-when-denying-then-enabling%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Check here - developer.apple.com/documentation/photokit/…
– Amir Khan
Mar 28 at 12:20
@Anna Oriova, Did you quit and launch the app or launch it from background to read the authorizationStatus after changing the permission to allow / denied?
– Anand
Mar 28 at 16:25
@Anand I did both ways.
– Anna Orlova
Mar 28 at 17:11
I tested the above code. whenever the permission is changed, the authorizationStatus gets printed correctly for me. It did not print "Not Determined" always as you mentioned. I can think of only one scenario here. Are you by any chance having two apps with same display name and different bundle id installed in the same device? (Actually this is possible. One will dev signed and another can be inhouse signed.) If that is the case, there is a chance that you change permission to one app and see the status in another app. Just a thought..
– Anand
Mar 29 at 5:56