I am very new to Mac and IOS, this is my first time building our game for iOS. Using Mac 2022 M2 arm 64, Unity version 2022, building for iOS min 13. The same project has been built for iOS successfully before by another developer, so the problem is on my side. I didn’t change any settings in the exported Xcode project other than adding the provision file.
The problem:
Unity creates the Xcode project, which I then open in Xcode, add the certificate and provision file. When I click Product/Archive I get 79 linking errors at the end of the build. All of them are undefined symbols referenced by UICKeyChainStore.o
Some examples:
"_SecAccessControlCreateWithFlags", referenced from: -[UICKeyChainStore attributesWithKey:value:error:] in UICKeyChainStore.o "_SecAddSharedWebCredential", referenced from: -[UICKeyChainStore setSharedPassword:forAccount:completion:] in UICKeyChainStore.o "_SecCreateSharedWebCredentialPassword", referenced from: +[UICKeyChainStore generatePassword] in UICKeyChainStore.o "_SecItemAdd", referenced from: -[UICKeyChainStore setData:forKey:genericAttribute:label:comment:error:] in UICKeyChainStore.o "_SecItemCopyMatching", referenced from: -[UICKeyChainStore contains:] in UICKeyChainStore.o -[UICKeyChainStore dataForKey:error:] in UICKeyChainStore.o -[UICKeyChainStore setData:forKey:genericAttribute:label:comment:error:] in UICKeyChainStore.o +[UICKeyChainStore allKeysWithItemClass:] in UICKeyChainStore.o +[UICKeyChainStore allItemsWithItemClass:] in UICKeyChainStore.o -[UICKeyChainStore items] in UICKeyChainStore.o "_SecItemDelete", referenced from: -[UICKeyChainStore removeItemForKey:error:] in UICKeyChainStore.o -[UICKeyChainStore removeAllItemsWithError:] in UICKeyChainStore.o "_SecItemUpdate", referenced from: -[UICKeyChainStore setData:forKey:genericAttribute:label:comment:error:] in UICKeyChainStore.o "_SecRequestSharedWebCredential", referenced from: +[UICKeyChainStore requestSharedWebCredentialForDomain:account:completion:] in UICKeyChainStore.o "_kSecAttrAccessControl", referenced from: -[UICKeyChainStore attributesWithKey:value:error:] in UICKeyChainStore.o "_kSecAttrAccessGroup", referenced from: +[UICKeyChainStore prettify:items:] in UICKeyChainStore.o -[UICKeyChainStore query] in UICKeyChainStore.o
Any suggestions on what to do?) Am I missing a dependency? Should I add UICKeyChainStore as a dependency to the project?
I tried to add UICKeyChainStore as a separate dependency to the project. The undefined references error were gone, but I then got 3 duplicate symbols errors. This library is added somewhere else in the project apparently. I don’t think adding UICKeyChainStore again is necessary.
Ruslan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.