Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared Keychain iOS 8 Simulator on Yosemite #24

Open
lukesteffen opened this issue Nov 21, 2014 · 3 comments
Open

Shared Keychain iOS 8 Simulator on Yosemite #24

lukesteffen opened this issue Nov 21, 2014 · 3 comments

Comments

@lukesteffen
Copy link

There is an issue using shared keychain items only in Yosemite using iOS 8 simulators. It appears that the kSecAttrAccessGroup is now needed in this specific configuration. Keychain calls that would previously fail when including the kSecAttrAccessGroup key with an error of -25243 are now successful. Further, the shared keychain does not appear to be globally available to the simulator requiring the kSecAttrAccessGroup key to be used. I simply commented out the simulator check in dataForKey: and setObject:forKey:

//#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
    if ([_accessGroup length]) query[(__bridge NSString *)kSecAttrAccessGroup] = _accessGroup;
//#endif

I haven't figured out any other way around this issue yet.

Update: I'm using OS X Yosemite v10.10.1 (14B25) and Xcode 6.1 (6A1052d)

@levigroker
Copy link

Interestingly, commenting out these checks also prevented a deadlock situation where the dataForKey: method would block in a semaphore_wait when calling out to SecItemCopyMatching on this line: OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&data);
I experienced this in the iOS 8 simulator running in Yosemite 10.10.1 (14B25) w/Xcode 6.1.1 (6A2008a)

@ekurutepe
Copy link

I can confirm that commenting out these checks enables shared keychains on iOS 8 simulator on Yosemite. Thanks @Taurus084! What about a pull request?

@ghost
Copy link

ghost commented Jan 18, 2015

@ekurutepe Unfortunately this fix only works for the iOS 8 simulator on Yosemite. Commenting out the simulator exceptions causes the shared keychain access to fail on iOS 7 simulators on Yosemite and both iOS 7 & 8 simulators on Mavericks. Therefore, I don't see a reasonable resolution in code. Apple needs to make a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants