kishikawakatsumi / UICKeyChainStore

UICKeyChainStore is a simple wrapper for Keychain on iOS, watchOS, tvOS and macOS. Makes using Keychain APIs as easy as NSUserDefaults.
http://kishikawakatsumi.com
MIT License
3.08k stars 383 forks source link

Inhibit warnings by wrapping versioning parts into availability blocks. #170

Closed lolgear closed 4 years ago

lolgear commented 5 years ago

It happens in this method.

- (BOOL)setData:(NSData *)data forKey:(NSString *)key genericAttribute:(id)genericAttribute label:(NSString *)label comment:(NSString *)comment error:(NSError *__autoreleasing *)error
#if TARGET_OS_IOS
    if (floor(NSFoundationVersionNumber) > floor(1144.17)) { // iOS 9+
        query[(__bridge __strong id)kSecUseAuthenticationUI] = (__bridge id)kSecUseAuthenticationUIFail; // put it into available block warning
#if  __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0