diff --git a/Branch-SDK/BNCKeyChain.m b/Branch-SDK/BNCKeyChain.m index da9c880d3..51a4eba29 100644 --- a/Branch-SDK/BNCKeyChain.m +++ b/Branch-SDK/BNCKeyChain.m @@ -92,7 +92,7 @@ + (NSDate *) retrieveDateForService:(NSString *)service key:(NSString *)key erro id value = nil; if (valueData) { @try { - if (@available(iOS 12.0, *)) { + if (@available(iOS 11.0, tvOS 11.0, *)) { value = [NSKeyedUnarchiver unarchivedObjectOfClass:[NSDate class] fromData:(__bridge NSData*)valueData error:NULL]; } else { #if __IPHONE_OS_VERSION_MIN_REQUIRED < 12000 @@ -120,7 +120,7 @@ + (NSError *) storeDate:(NSDate *)date NSData* valueData = nil; @try { - if (@available( iOS 12.0, *)) { + if (@available(iOS 11.0, tvOS 11.0, *)) { valueData = [NSKeyedArchiver archivedDataWithRootObject:date requiringSecureCoding:YES error:NULL]; } else { #if __IPHONE_OS_VERSION_MIN_REQUIRED < 12000 diff --git a/Branch-SDK/BNCPreferenceHelper.m b/Branch-SDK/BNCPreferenceHelper.m index ec76e71f1..83b446afe 100644 --- a/Branch-SDK/BNCPreferenceHelper.m +++ b/Branch-SDK/BNCPreferenceHelper.m @@ -744,7 +744,7 @@ - (void)persistPrefsToDisk { if (!self.persistenceDict) return; NSData *data = nil; @try { - if (@available( iOS 12.0, *)) { + if (@available(iOS 11.0, tvOS 11.0, *)) { data = [NSKeyedArchiver archivedDataWithRootObject:self.persistenceDict requiringSecureCoding:YES error:NULL]; } else { #if __IPHONE_OS_VERSION_MIN_REQUIRED < 12000 @@ -787,7 +787,7 @@ - (NSMutableDictionary *)persistenceDict { NSError *error = nil; NSData *data = [NSData dataWithContentsOfURL:self.class.URLForPrefsFile options:0 error:&error]; if (!error && data) { - if (@available(iOS 12.0, *)) { + if (@available(iOS 11.0, tvOS 11.0, *)) { persistenceDict = [NSKeyedUnarchiver unarchivedObjectOfClass:[BNCServerRequest class] fromData:data error:NULL]; } else { #if __IPHONE_OS_VERSION_MIN_REQUIRED < 12000 diff --git a/Branch-SDK/BNCServerRequestQueue.m b/Branch-SDK/BNCServerRequestQueue.m index 7d9d5784e..5763f91eb 100755 --- a/Branch-SDK/BNCServerRequestQueue.m +++ b/Branch-SDK/BNCServerRequestQueue.m @@ -324,7 +324,7 @@ - (NSData *)oldArchiveQueue:(NSArray *)queue { - (NSData *)archiveObject:(NSObject *)object { NSData *data = nil; NSError *error = nil; - if (@available(iOS 12.0, *)) { + if (@available(iOS 11.0, tvOS 11.0, *)) { data = [NSKeyedArchiver archivedDataWithRootObject:object requiringSecureCoding:YES error:&error]; if (!data && error) { @@ -381,7 +381,7 @@ - (void)retrieve { - (id)unarchiveObjectFromData:(NSData *)data { id object = nil; - if (@available(iOS 12.0, *)) { + if (@available(iOS 11.0, tvOS 11.0, *)) { object = [NSKeyedUnarchiver unarchivedObjectOfClasses:[BNCServerRequestQueue encodableClasses] fromData:data error:nil]; } else {