Bug? Scriptable Keychain fails to read key set on other device

I’m not sure if this is a bug or an undocumented limitation of Keychain.

I use Keychain to store API keys to access web services in scripts I can publish.

  1. iPad: define call Keychain.set('api-key')
  2. iPad: I can retrieve the key value with Keychain.get('api-key')
  3. iPhone:
  • open passwords in Settings,
  • the entry for ‘api-key’ is visible with proper value
  1. iPhone:
    • call Keychain.contains('api-key') -> false (unexpected!)
    • call Keychain.get('api-key') >> exception, this one is expected.
  2. iPhone: set the entry again with Keychain.set()
  3. iPhone:
    • call Keychain.contains('api-key') -> true
    • call Keychain.get('api-key') -> key value

This can be reproduced easily and is not limited to first access to the

Did I miss something ?

(running iOS 14)