Open vani2 opened 1 year ago
I am experiencing the same problem.
Running unit test in swift package gives the error:
OSStatus error:[-34018] Internal error when a required entitlement isn't present, client has neither application-identifier nor keychain-access-groups entitlements.
Keychain capability is on as well.
Executing the unit test in the app project works. There is a problem with swift package not handling entitlements.
https://forums.swift.org/t/host-application-for-spm-tests/24363
@NikolaGrujic91 @vani2 This is a while after but to anyone reading this, the solution I found was to select a host application in your unit test framework.
Targets->TestFramework->General->Testing->Host Application
I have no problem with calling from the main bundle.
But I want to write a unit test, and I've got
My project structure is following:
KeychainAccess
as a dependency.KeychainAccess
.My package file
I test at the iPhone Simulatore, Xcode 14.2. Keychain capability is on. I also tried https://github.com/kishikawakatsumi/KeychainAccess/issues/549#issuecomment-1304701780 but didn't help.