Write Permissions Error (-61) returned by SecItemAdd() Objective-C API

The Keychain API SecItemAdd() returns -61 status code.

  • Programming Language: objective-c
  • OS: Mac BigSur 11.6.3
  • Default keychain: /Users/user_name/Library/Keychains/login.keychain-db
  • Ownership: UID and GID of logged in user match those of the keychain
  • Status of keychain as reported by SecKeychainGetStatus(): 7 (unlocked + read-permission + write-permission)
  • Test runs fine in local environment but fails in CI environment
  • Additional info - Attributes: kSecClass: kSecClassGenericPassword, kSecAttrAccount: (NSString*)key, kSecAttrService: (NSString*)service, kSecValueData: (NSData*)data

Add a Comment