Skip to main content
Inspiring
September 22, 2012
Question

Need to detect photo privacy setting on iOS 6 to avoid breakage.

  • September 22, 2012
  • 1 reply
  • 1926 views

iOS 6 has introduced a new privacy setting system that has users pick whether your app can access the camera roll. I tried catching an error when using addBitmapData to add to the camera roll, and that didn't work for detecting it. It also looks like that function returns void, so I can't check a return value for success. I need to do something like have a message to say this 'image cold not be stored to your photos because you have disabled photo access for this app'.

How do you tell if the photo privacy setting is turned off?

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
September 22, 2012

I haven't tried saving a photo yet, but when reading a photo you get the dialog asking permission to access the photo album. So, do you need to worry? If you go ahead and save the image, doesn't the user automatically get a dialog asking for permission?

FLAdudeAuthor
Inspiring
September 22, 2012

Yes, we need to worry.

Reading a photo is fine, it has a thing that comes up that says you need to give it permission whenever you attempt to access the user's photos, but writing a photo is horribly broken. The very first time your app attempts to save an image to the camera roll, and ONLY the very first time, it will have a thing that asks if you would like to let the app access your photos.

After that, if they pick no, or for some reason somebody has gone into the settings and turned the permission off for your app, it will silently fail forever after. It would leave you with an unacceptable non-user-friendly nightmare scenerio where they think they are saving their stuff but it is actually not. They will get mad when they look at their photos later and find that all of the stuff they 'saved' is missing and say that your app is broken and does not save stuff or that it deleted their stuff.

Who would even think about approving an app with such sloppy, unpolished, user infuriating potential?

FLAdudeAuthor
Inspiring
September 23, 2012

Update: I have figured out that you can detect success or failure of the addBitmapData due to permissions by attaching an ErrorEvent.ERROR listener to the CameraRoll and an Event.COMPLETE for success. It apparently is asynchronous which is why catching an error with try/catch wouldn't work and it can't be checked with a return value.