Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dookieman

macrumors 6502
Original poster
Oct 12, 2009
390
67
Anyone else having an issue pulling a Keychain value that was set by a separate viewController in iOS 8? My app works when it compiles with Xcode 5, but not Xcode 6, it keeps returning (null).

Example.

Xcode 5/iOS 7
Code:
-(IBAction)testButton:(id)sender {
    NSLog(@"%@\n %@", [JNKeychain loadValueForKey:@"username"], [JNKeychain loadValueForKey:@"password"]);
}
Would return what the user entered. E.G. (test, 123)

Xcode 6/iOS 8
Code:
-(IBAction)testButton:(id)sender {
    NSLog(@"%@\n %@", [JNKeychain loadValueForKey:@"username"], [JNKeychain loadValueForKey:@"password"]);
}
Returns (null), (null)

Any ideas?
 

xStep

macrumors 68020
Jan 28, 2003
2,031
143
Less lost in L.A.
Your code is not helpful because you're using a wrapper, JNKeychain, which is where the actual execution occurs. Did into that wrapper to see what it is doing.

Also recall that the simulator acts differently from a device, in case it matters in you testing here.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.