soffes/sskeychain — pull request #61 by jmoody (2014-03-07 02:41:25+00:00)
Title: WIP first pass fix for iOS < 7 support

## action items

- [ ] support for MacOS < 10.9
- [ ] what to do about `setSynchronizationMode:` when keychain sync is not supported

## motivation

builds on the work of @Eugene-Gubin PR https://github.com/soffes/sskeychain/pull/60

The current fix for iOS < 7 leaves the `SSKEYCHAIN_SYNCHRONIZABLE_AVAILABLE` in a bad state; it can be 1 when synchronization is not available.

It also breaks MacOS support - unguarded call to `[UIDevice currentDevice]`

It does the _right_ thing with respect to restricting access to `kSecAttrSynchronizable` for iOS < 7. I did a bunch of testing and found that on iOS 6 (somehow) `kSecAttrSynchronizable` was allowed although it did not appear in any headers.

The fix implements the strategy I mentioned here: https://github.com/soffes/sskeychain/issues/56

This fix clashes (violently?) with the style and conventions of the original source - it is a pragmatic solution, not a pretty one.

I am willing to iterate on it until it is a good shape.

Thanks @soffes and the other maintainers for your hard work!

PS: The XCTests were all broken when I pulled from master. Is this expected? (Xcode 5.0.2, iPad 4 iOS 7.0.4)