Im storing multiple accounts to the keychain with an account name, username and password. Account name will be unique. Would it be considered bad practice to keep a list of account names stored in userdefaults and use this list to loop through and grab each account in the keychain?
Asked
Active
Viewed 356 times
1
-
1Userdefaults or any plist or asset file gets copied as part of the IPA file which can be unzipped to access the contents. So don't store anything in user defaults that is confidential. Store everything in Keychain and you can fetch all of them. – user1046037 Nov 27 '19 at 15:47
-
So the account names aren't confidential. How would I fetch each account without a key such as the account name? – shrimpsonnn Nov 27 '19 at 17:36
-
1You can search by `kSecClass`. It will list all items in the `kSecClass`. Refer https://stackoverflow.com/questions/10966969/enumerate-all-keychain-items-in-my-ios-application – user1046037 Nov 28 '19 at 03:05