Keychain sometimes returns empty value [duplicate]
Asked Answered
U

1

13

We are using native key-chain wrapper class to store and retrieve values from the key-chain. But in some case the value is getting deleted/empty.

We have the below items enabled in our app

  1. Location service ON - Always state initially and user can change that in device settings
  2. Background Fetch - ON - We are not using any specific method for this in code. (i.e performfetchwithcompletionhandler method not used/added in code )

Whether the above scenario may have impact on keychain items or is there any other scenario which can cause keychain items to be deleted.

Ugrian answered 29/3, 2016 at 13:29 Comment(1)
do you use SecAccessControlRef while writing something to your keychain?Broucek
U
0

I don't think the scenarios you described here related to the error you got. Please provide more information like error code returned by Keychain API and the OS version your code runs on. Without these information people can hardly determine what actually happened.

From iOS 8, developers encounter a few errors with Keychain on devices. Background keychain accessing with invalid setting may cause problems. However in other situation, i.e. debugging with Xcode attached, even valid code may encounter errors. These are known issues to Apple keychain engineers. Some of them are reported as fixed in iOS 9.3. You may check this SSKeychain issue and this post on Apple dev forum.

Unquestioning answered 29/4, 2016 at 7:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.