Questions tagged [keychainitemwrapper]

an Objective-C wrapper for accessing a single keychain item, the sample code was originally created by Apple but now available in modified & modernized (for ARC) forms from a variety of sources.

96 questions
0
votes
1 answer

NSInternalInconsistencyException when keychain item update

i'm use keychain in my app with keychainitemwrapper. So, i did update 'kSecAttrAccessible' use setObject:(id) method. But errors occur. Like this, Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't…
OreonHard
  • 3
  • 3
0
votes
0 answers

App crash at saving uuid in KeychainItemWrapper.m in iPad Air (IOS Swift)

My app crashes in iPad Air,os 12.2.0.. the crashlytics in Fabric shows the crash at line 315 NSAssert( result == noErr, @"Couldn't add the Keychain Item." ); in KeychainItemWrapper.m file. This method is called to store UUID in app : func…
Rj19
  • 305
  • 1
  • 6
  • 20
0
votes
1 answer

How can we get secondVC json value in firstVC without going to secondVC in swift

my firstVC json contains all other view controller json ids... here i want before pushing to other view controller i need to compare it with home home json id here which 2 ids are same i need to push thatVC.. so here without going to any other view…
Swift
  • 1,074
  • 12
  • 46
0
votes
0 answers

saving in ios keychain is not persistent

I am using Apple KeyChainItemWrapper to store to keychain. The problem is if I log the stored data directly after saving (by instantiate a new keychainItem with the same identifier) I can see the data. But when I kill the app and reopen it it…
zizoodiesel
  • 197
  • 1
  • 13
0
votes
2 answers

NSInternalInconsistencyException: Couldn't update the Keychain Item

After adding the line to set kSecAttrAccessible to kSecAttrAccessibleAlways to make the keychain accessible even when the screen is locked I started seeing this error. Normally it comes when keychain sharing is not configured, but my keychain…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
0
votes
1 answer

element as AnyObject vs element vs AnyObject?

Reading Apple's code I've seen the following (talking about Keychain services): query[kSecAttrService as String] = service as AnyObject? What's the purpose of AnyObject?? I think it could be simplified as query[kSecAttrService as String] = service…
Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
0
votes
1 answer

iOS keychain - Different values found on subsequent reads

I'm using the keychainItemWrapper to store a token in my ios keychain. I can write successfully and read the first time successfully. However, once I read subsequent times, or run my program again, I'm getting a different value, or data in a…
user9211159
  • 143
  • 3
  • 9
0
votes
1 answer

iOS, Keychain kSecAttrAccount not saving

When fetching the data: KeychainItemWrapper *keychain = [[KeychainItemWrapper alloc] initWithIdentifier:@"LoginData" accessGroup:nil]; NSString *user = [[NSUserDefaults standardUserDefaults] valueForKey:@"ACC"]; NSString *pass = [keychain…
Simon.
  • 1,886
  • 5
  • 29
  • 62
0
votes
1 answer

iOS: store userName, password and access token using keychain

I want to use keychain in order to store username, password and access token. I added the keychainItem.h and keyChainItem.m implemented here. And this is what I did: 1- I created a property keychain in myViewController.h then in the viewDidLoad I…
Ne AS
  • 1,490
  • 3
  • 26
  • 58
0
votes
1 answer

iOS KeyChain Items not being updated between multiple targets of an app

I am building an app where people need to be able to share a photo from the iOS photos app. To do so people need to be logged in into the app. So I created a new iOS target for the sharing. Now I am using KeychainItemWrapper to store user…
Bocaxica
  • 3,911
  • 3
  • 37
  • 54
0
votes
0 answers

Assertion failure in -[KeychainItemWrapper writeToKeychain] method

Received below error and my app crashes. Removed derived data still not success. 2016-11-16 17:57:33.285311 WCMH[59760:914565] [MC] Reading from private effective user settings. 2016-11-16 17:57:33.285 WCMH[59760:914454] *** Assertion failure in…
Mehul Chuahan
  • 752
  • 8
  • 19
0
votes
1 answer

How to store multiple passwords in Keychain class with unique Key?

I need to store multiple passwords/passcode with unique key in Keychain. I'm getting nil value during fetch the stored data from the keychain. Can any one help me out from this. This is my code... - (void)storeSensitiveDataToKeychain:(NSString…
Surezz
  • 561
  • 4
  • 12
0
votes
1 answer

KeychainItemWrapper causes crash for Distribution iOS build

In my iOS app, I am using KeychainItemWrapper given by Apple to save some important data of my app. App works fine when I deploy app on mobile using developer provisioning profile, but when same app I deploy by creating distribution build using…
Swapnil
  • 1,858
  • 2
  • 22
  • 49
0
votes
1 answer

iOS Keychain Crashing While Getting Details

Having a bit of an issue with using keychain to store login information to my app. It works perfectly fine and will display the information when I go in and out of other apps but once I fully close down the app and try to reopen it and click to…
Curtis Boylan
  • 827
  • 1
  • 7
  • 23
0
votes
0 answers

iOS random character being dropped in uitextfield

I"m saving my user email id, password and auth token in keychain. Sometimes, the password text alone drops a character, but others doesn't. I couldn't figure out what is causing this problem. Initially I had these saved in NSUserDefaults and the…
LoveMeSomeFood
  • 3,137
  • 7
  • 30
  • 53