iOS 26+ (some users only) Keychain item readable right after save, but missing after app relaunch (errSecItemNotFound -25300)

Hi, I’m seeing a production issue on iOS 26+ that only affects some users.

symptoms:

  1. It does NOT happen for all users.
  2. It happens for a subset of users on iOS 26+.
  3. If we write a value to Keychain and read it immediately in the same session, it succeeds. However, after terminating the app and relaunching, the value appears to be gone: SecItemCopyMatching returns errSecItemNotFound (-25300).

Repro (as observed on affected devices):

  1. Launch app (iOS 26+).
  2. Save PIN data to Keychain using SecItemAdd (GenericPassword).
  3. Immediately read it using SecItemCopyMatching -> success.
  4. Terminate the app (swipe up / kill).
  5. Relaunch the app and read again using the same service -> returns -25300.

Expected: The Keychain item should persist across app relaunch and remain readable (while the device is unlocked).

Actual: After app relaunch, SecItemCopyMatching returns errSecItemNotFound (-25300) as if the item does not exist.

Implementation details (ObjC): We store a “PIN” item like this (simplified):

  • addItem:

    • kSecClass: kSecClassGenericPassword
    • kSecAttrService: <FIXED_STRING>
    • kSecValueData: <Item bytes>
    • kSecAttrAccessControl: SecAccessControlCreateWithFlags(..., kSecAttrAccessibleWhenUnlockedThisDeviceOnly, 0, ...)
  • readItem (SecItemCopyMatching):

    • kSecClass: kSecClassGenericPassword
    • kSecAttrService: <FIXED_STRING>
    • kSecReturnData: YES
    • (uses kSecUseOperationPrompt in our async method)

Question: On iOS 26+, is there any known issue or new behavior where a successfully added GenericPassword item could later return errSecItemNotFound after app termination/relaunch for only some users/devices?

What should we check to distinguish:

  • OS behavior change/bug vs.
  • entitlement/access-group differences (app vs extension, provisioning/team changes),
  • device state/policies (MDM, passcode/biometrics changes),
  • query attributes we should include to make the item stable across relaunch?

Build / Dev Environment:

  • macOS: 15.6.1 (24G90)
  • Xcode: 26.2
Answered by DTS Engineer in 875763022
we’re currently investigating based on telemetry only.

Yeah, that makes things tricky. It’s unlikely I’ll be able to offer useful insight without a sysdiagnose log )-:

As to how you get that, I have some ideas on that topic in Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Most of the weird keychain failures I see like this are caused by folks using the keychain API incorrectly. I talk about this a lot of in:

However, your additem and readitem summaries look pretty reasonable. It’s hard to see how you could hit the symptoms you’ve described based on this setup.

Are you able to reproduce this on a device that you control? Or are you investing this based solely on reports coming in from your users?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi Quinn, thanks for the references.

Unfortunately I’m not able to reproduce this on any device that I control at the moment. This was reported by a very small subset of production users on iOS 26+, and so far we’ve only been able to confirm the OSStatus from logs (SecItemCopyMatching returning errSecItemNotFound / -25300 after app relaunch).

We don’t have a consistent repro case yet, so we’re currently investigating based on telemetry only.

Accepted Answer
we’re currently investigating based on telemetry only.

Yeah, that makes things tricky. It’s unlikely I’ll be able to offer useful insight without a sysdiagnose log )-:

As to how you get that, I have some ideas on that topic in Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

iOS 26&#43; (some users only) Keychain item readable right after save, but missing after app relaunch (errSecItemNotFound -25300)
 
 
Q