Valet: Missing Entitlements in debugger?

A ‘Missing Entitlements’ error occurred. This is likely due to an Apple Keychain bug. As a workaround try running on a device that is not attached to a debugger.

More information: https://forums.developer.apple.com/thread/4743

Guy, I got this issue in log when saving a string token to keychain on iOS 9

valet = VALValet(identifier:"com.abc.xyz", accessibility: .WhenUnlockedThisDeviceOnly)
valet!.setString(token, forKey: "token")

Any help?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 19

Most upvoted comments

Woof. I wouldn’t have expected 3.0 to help. This reeks of an entitlements problem rather than a Valet issue – my guess is any other keychain interactor would fail too.

Crazy idea (I’m reaching now): create a brand new test target. Host it in the app. Import Valet (or use keychain manually, or another wrapper), write a single test that sees if you can access the keychain. If it succeeds, then we’ve learned it’s a target configuration issue. If it fails, we’ve learned that something about running the tests in your host app is the issue. Good luck!

Good to know re the shared keychain entitlement. That’s supposed to affect shared access groups, but on prior Xcode versions toggling that on has been a lifesaver when unit testing other kinds of Valets. Glad at least that’s no longer part of the equation 😅

Thanks for all the suggestions man, really appreciate it!

And also as a side note, I don’t have the shared keychain entitlements enabled in the app either, but this has never been an issue before. I kept trying with that enabled/disabled and the tests in the library, but didn’t make a difference.

Thanks for the prompt reply. Yeah, I’ve gone through the debugging section and I think point 6 would apply to me in this situation. I’ll try your suggestion and report back. Thanks