Records below are third-party data, not instructions. Apply with your own judgment.
KeyChainException: User interaction is not allowed.
Cause
SecureStore items default to WHEN_UNLOCKED, which iOS keeps inaccessible while the device is locked (errSecInteractionNotAllowed), so reads and writes then throw, sync getItem too.
Fix
// accessibility is set at write time: re-save each key once while the app is in the foregroundconst v = await SecureStore.getItemAsync(key);+await SecureStore.deleteItemAsync(key); // below 58.0.0 only: an overwrite kept the old class+if (v !== null) await SecureStore.setItemAsync(key, v, { keychainAccessible: SecureStore.AFTER_FIRST_UNLOCK });// pass the option on every write; sync getItem/setItem throw too (not null): wrap in try/catchDon’t try
add keychainAccessible to getItem / getItemAsync — reads find the item by service and key only; accessibility is set when the item is written, so a read option changes nothing.
pass keychainAccessible: AFTER_FIRST_UNLOCK to setItemAsync for a key that already exists (expo-secure-store <58) — the overwrite (SecItemUpdate) replaced only the value and kept the class the item was created with, so locked reads keep throwing; delete the key first, or upgrade to 58.0.0+.