IOS 8 beta OSStatus -34018 (errSecMissingEntitlement)

When I run my application built into the Xcode 6 / iOS SDK beta 3 in Simulator, the SecItemCopyMatching function returns error code -34018 (errSecMissingEntitlement).

OSStatus result = SecItemCopyMatching ((__bridge CFDictionaryRef)retrieveQueryDict, (CFTypeRef *)&dataRef);

I noticed this problem in beta 1, then in beta 2 it was fixed. In addition, Apple mentions the release of beta 1 fixed in beta 2. So far, so good. But then, in beta 3, this error occurs again, in the same place. But this time no explanation.

Does anyone else have this problem or do you have a workaround? This should only happen on Simulator (at least it was in the case of beta-1, at the moment I do not have a device to check), but for unit tests it is a blocker.

+4
source share
3 answers

I had exactly the same scenario as you. I am using SSKeychain, but it seems to be the same problem for everyone. Although the release notes do not indicate this, the problem seems to be in both iOS 8 beta 1 and beta 3, skipping the beta.

The workaround I used is based on some answers to: SecItemAdd and SecItemCopyMatching returns error code -34018 (errSecMissingEntitlement)

Here's what worked for me: I signed up my developer account in Xcode 6, and then turned on “Key Sharing” on the project’s targeting tab.

+2
source

, ( ). , , . , . , -34018.

, , " " , ( " iPhone" )

+1

Fixed in beta 4. There are no information in the release notes.

0
source

Source: https://habr.com/ru/post/1547724/


All Articles