Posts

Post not yet marked as solved
2 Replies
1.2k Views
Hello,we're using certificate-based authentication in our apps for communication to backend services. Now I wanted to port an app for macOS with the help of catalyst. The app itself works fine, but unfortunately I can't get anything from the macOS keychain.For testing I created a blank playground with macOS as target:let dic : NSDictionary = [kSecMatchLimit: kSecMatchLimitAll, kSecReturnAttributes: kCFBooleanTrue!, kSecAttrKeyClass: kSecAttrKeyClassPrivate, kSecReturnRef: kCFBooleanTrue!, kSecClass: kSecClassIdentity] var result : CFTypeRef? let resultCode : OSStatus = SecItemCopyMatching(dic, &result) if resultCode == errSecSuccess{...}With that I do get all identities that are currently available in my keychain, without any issues. This exact code works on my iOS device as well. When running this code as a UIKitForMac/Catalyst app the resultCode is always errSecItemNotFound (-25300).Does anyone know what the correct way is to get information from the macOS keychain in a catalyst app?Any help is appreciated, Thanks!
Posted
by xPPPinkix.
Last updated
.