Is there way in iOS to receive notification that a keychain entry has changed?

I've seen that in OS X that there is a SecKeychainCallback mechanism but there is no indication that such an event-callback paradigm exists for the iPhone.

We are using the keychain to pass some token data between iOS apps, and it would be good if an app could receive a Notification if the data has changed, without continuously checking for it.

有帮助吗?

解决方案

Unfortunately this isn't possible, Keychain Services on iOS is very barebones, and only provide simple APIs for accessing/storing items. And because it's C based, you won't be able to piggyback on any sort of KVO either.

You will need to poll at appropriate intervals.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top