简体   繁体   中英

Access the keychain from iOS keyboard extension

I wrote some code to share data between an application and an extension. The code works perfectly with "Action Extension" while it fails with "Custom keyboard" extension.

Each access to the keychain from the "Custom keyboard" extension ends with the same error status: -25291, errSecNotAvailable, "Key Chain not available" or "Keychain Manager was not loaded".

Is there a known limitation on accessing the keychain from a custom keyboard extension ? I did not find anything about that.

Regards. Sébastien Brault.

In fact the solution was in Apple's documentation : "By default, a keyboard has no network access and cannot share a container with its containing app. To enable these things, set the value of the RequestsOpenAccess Boolean key in the Info.plist file to YES. Doing this expands the keyboard's sandbox."

It just worked. Regards. Sébastien.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM