Hello,
before updating to MacOS Ventura (13.0.1) and Xcode 14.1 I was perfectly able to run a iOS application from Xcode on my Mac (so "My Mac (Designed for iPad)" is selected as a target). After these updates I can't access the keychain anymore, the following error is shown:
OSStatus error: [-34018] Security error has occurred.
In the console I see
Entitlement com.apple.application-identifier=TEAM.com.NAME.APP is ignored because of invalid application signature or incorrect provisioning profile
Entitlement com.apple.security.application-groups=(
"group.com.NAME.APP"
) is ignored because of invalid application signature or incorrect provisioning profile
App[76770]/1#8 LF=0 copy_matching Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither com.apple.application-identifier nor com.apple.security.application-groups nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither com.apple.application-identifier nor com.apple.security.application-groups nor keychain-access-groups entitlements}
Checking the created *.app file with codesign -d --entitlements
results in:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>TEAM.com.NAME.APP</string>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.team-identifier</key>
<string>TEAM</string>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.NAME.APP</string>
</array>
<key>get-task-allow</key>
<true/>
</dict>
</plist>
So, the application identifier is actually there, as is the application-group. When I install the latest version of the app from the App Store, everything is working fine. Running the app on a real iOS device also works perfectly fine from Xcode, it's just running on Mac which isn't working properly.
Has something changed with Ventura or Xcode 14.1? Any idea what I can do/try?