Yes Quinn, as! cast causes the crash  EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0).It looks like only this typecasting from SecKey to SecKeychainItem has issue else following code (to typecast CFTypeRef to SecKeychainItem) works fine and give SecACL just fine: var status = SecItemCopyMatching(getquery as CFDictionary, &item) //let dict = item as! CFDictionary guard status == errSecSuccess else { DLog(message: Keychain lookup failed error : (SecCopyErrorMessageString(status, nil)! as String)) return nil } let key = item as! SecKeychainItem var secAccess : SecAccess? status = SecKeychainItemCopyAccess(key, &secAccess) guard status == errSecSuccess, secAccess != nil else { DLog(message: Could not get SecAccess : (SecCopyErrorMessageString(status, nil)! as String)) return nil }Also, would it be possible to update the ACL of this keychain item by the owner of the key i.e. daemon? When we call SecKeychainItemSetAccess
                    
                  
                
              
              
                
                Topic:
                  
	
		Privacy & Security
  	
                
                
                SubTopic:
                  
                    
	
		General
		
  	
                  
                
              
              
                Tags: