Simulator builds cannot access Keychain

I’m seeing that builds generated by the “Xcode build for simulator” step cannot access Keychain. Any operations using the Security framework fail with the following error:

... copy_matching Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither application-identifier nor keychain-access-groups entitlements}

My entitlements file does in fact have both of those entitlements. I am wondering if this is potentially caused by this line in the step:

// Disable the code signing for simulator build
xcodeBuildCmd.SetDisableCodesign(true)

If code signing is disabled, are entitlements included with the build? Don’t you have to use AdHoc signing here?

1 Like

Hello @cellis-cricut :smiley:

Can you please submit a support ticket with the build or app URL, and enable support access? To enable support access, go to the “Settings” tab for the app. Scroll down to “Enable Bitrise Support User for this app” and toggle the switch located on the right to the on position.

Thank you!
Bitrise Support

For sure, I’ll do that right now.

EDIT: Submitted. Support ID #16797

For those interested, until the “Xcode build for simulator” step supports configuring whether or not to disable code signing, you can pass "CODE_SIGN_LOCAL_EXECUTION_IDENTITY=Ad Hoc" as an additional option in the debug section.