Accessing keychain on device regularly gives error -34018

Originator:mcknut
Number:rdar://23409669 Date Originated:05-Nov-2015 10:54 AM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification: Reproducible:
 
Summary:
I have an app that securely stores information in the keychain. Regularly when I try to build the app in Xcode and run it on my device I get error: -34018. Problem does not occur when I distribute my app on the app store or using an Enterprise certificate.

Steps to Reproduce:
1. Launch app.
2. Attempt to access secure information from keychain straight away.
3. Perform other operations.
4. Attempt to access secure information from keychain after a few seconds.

Expected Results:
In both cases I would expect to be able to access the keychain.

Actual Results:
Generally the first attempt to access the keychain will work but the second and any subsequent ones will fail.

Version:
iOS9.1, 9.0, 8.x

Notes:
Seems to occur a lot more often on iOS9. With iOS 8 the problem seemed intermittent, on iOS9 it's rare that the problem does not occur.

Configuration:
iPhone 6

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!