1

Is there a way to get a list of keychain access groups in an iOS app at runtime?

I want a piece of code to use an access group when available, but not use it otherwise. This is a library, so I'd rather not force the user of the library to redundantly specify this if I can avoid it.

1 Answer 1

1

I. I'm sure there's a better method than this one. Why not try to use the access group unconditionally, then check for errors and fall back gracefully if the attempt to store/retrieve data was not successful?

II. If not, then have a look at Keychain-Dumper. You will surely find some inspiring ideas inside. I especially recommend studying the printKey() function for having an idea about getting all the access groups by iteraring through each keychain entry.

1
  • Thanks, I used your first suggestion to try and fall back gracefully on failure. Apr 16, 2013 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.