raghul
raghul

Reputation: 1048

is keychain in ios threadsafe?

I would like to add some items to the keychain using "secitemadd", but I need to know first, if this is thread safe.

I have read the documentation from apple, but I am unable to find anywhere stating if its thread-safe.

Upvotes: 14

Views: 6241

Answers (2)

mash
mash

Reputation: 4516

In another document, Apple says it is thread safe.

Concurrency Considerations
On iOS, all the functions in this API are thread-safe and reentrant.

see Certificate, Key, and Trust Services Reference

Upvotes: 21

Vyacheslav
Vyacheslav

Reputation: 27221

Keychain isn't thread-safe. If we try to retrieve the keychain information it returns -25300 from time to time in practice. Be careful.

Upvotes: 1

Related Questions