diff --git a/packages/default-storage-backend/ios/RNCAsyncStorage.mm b/packages/default-storage-backend/ios/RNCAsyncStorage.mm index 342c5ce2..4bfa9458 100644 --- a/packages/default-storage-backend/ios/RNCAsyncStorage.mm +++ b/packages/default-storage-backend/ios/RNCAsyncStorage.mm @@ -155,6 +155,10 @@ static void RCTAppendError(NSDictionary *error, NSMutableArray * static NSString *storageDirectory = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ +#if TARGET_OS_TV + RCTLogWarn( + @"Persistent storage is not supported on tvOS, your data may be removed at any point."); +#endif storageDirectory = RCTCreateStorageDirectoryPath(RCTStorageDirectory); }); return storageDirectory; @@ -499,11 +503,6 @@ - (NSDictionary *)_ensureSetup { RCTAssertThread(RCTGetMethodQueue(), @"Must be executed on storage thread"); -#if TARGET_OS_TV - RCTLogWarn( - @"Persistent storage is not supported on tvOS, your data may be removed at any point."); -#endif - NSError *error = nil; if (!RCTHasCreatedStorageDirectory) { _createStorageDirectory(RCTGetStorageDirectory(), &error);