From f08b5044d64197a3227017ad44235a2bd7421691 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 3 Jan 2018 12:12:22 -0800 Subject: Add Community Supported tvOS (#590) Add Community Supported tvOS for Core, Auth, Database and Storage. Add tvOS unit tests Add tvOS sample app Update README.md Add tvOS to travis testing --- Firebase/Database/Core/FPersistentConnection.m | 2 +- Firebase/Database/Core/FRepo.m | 4 ++-- Firebase/Database/Persistence/FLevelDBStorageEngine.m | 2 +- Firebase/Database/Realtime/FWebSocketConnection.m | 4 ++-- Firebase/Database/third_party/SocketRocket/FSRWebSocket.m | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'Firebase/Database') diff --git a/Firebase/Database/Core/FPersistentConnection.m b/Firebase/Database/Core/FPersistentConnection.m index 6f71d8b..870727c 100644 --- a/Firebase/Database/Core/FPersistentConnection.m +++ b/Firebase/Database/Core/FPersistentConnection.m @@ -925,7 +925,7 @@ static void reachabilityCallback(SCNetworkReachabilityRef ref, SCNetworkReachabi - (void) sendConnectStats { NSMutableDictionary *stats = [NSMutableDictionary dictionary]; - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV if (self.config.persistenceEnabled) { stats[@"persistence.ios.enabled"] = @1; } diff --git a/Firebase/Database/Core/FRepo.m b/Firebase/Database/Core/FRepo.m index 0935b44..1c4b956 100644 --- a/Firebase/Database/Core/FRepo.m +++ b/Firebase/Database/Core/FRepo.m @@ -53,7 +53,7 @@ #import "FValueEventRegistration.h" #import "FEmptyNode.h" -#if TARGET_OS_IOS +#if TARGET_OS_IOS || TARGET_OS_TV #import #endif @@ -546,7 +546,7 @@ return; // Targetted compilation is ONLY for testing. UIKit is weak-linked in actual release build. - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV // The idea is to wait until any outstanding sets get written to disk. Since the sets might still be in our // dispatch queue, we wait for the dispatch queue to catch up and for persistence to catch up. // This may be undesirable though. The dispatch queue might just be processing a bunch of incoming data or diff --git a/Firebase/Database/Persistence/FLevelDBStorageEngine.m b/Firebase/Database/Persistence/FLevelDBStorageEngine.m index 490fb6c..7de9ebf 100644 --- a/Firebase/Database/Persistence/FLevelDBStorageEngine.m +++ b/Firebase/Database/Persistence/FLevelDBStorageEngine.m @@ -211,7 +211,7 @@ static NSString* trackedQueryKeysKey(NSUInteger trackedQueryId, NSString *key) { } + (NSString *) firebaseDir { - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [dirPaths objectAtIndex:0]; return [documentsDir stringByAppendingPathComponent:@"firebase"]; diff --git a/Firebase/Database/Realtime/FWebSocketConnection.m b/Firebase/Database/Realtime/FWebSocketConnection.m index 0fd07e5..49d6bd8 100644 --- a/Firebase/Database/Realtime/FWebSocketConnection.m +++ b/Firebase/Database/Realtime/FWebSocketConnection.m @@ -25,7 +25,7 @@ #import "FStringUtilities.h" #import "FIRDatabase_Private.h" -#if TARGET_OS_IOS +#if TARGET_OS_IOS || TARGET_OS_TV #import #endif @@ -85,7 +85,7 @@ BOOL hasUiDeviceClass = NO; // Targetted compilation is ONLY for testing. UIKit is weak-linked in actual release build. - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV Class uiDeviceClass = NSClassFromString(@"UIDevice"); if (uiDeviceClass) { systemVersion = [uiDeviceClass currentDevice].systemVersion; diff --git a/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m b/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m index a2c857b..c80dbb0 100644 --- a/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m +++ b/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m @@ -18,7 +18,7 @@ #import "FSRWebSocket.h" -#if TARGET_OS_IOS +#if TARGET_OS_IOS || TARGET_OS_TV #define HAS_ICU #endif @@ -28,7 +28,7 @@ #import #endif -#if TARGET_OS_IOS +#if TARGET_OS_IOS || TARGET_OS_TV #import #elif TARGET_OS_OSX #import -- cgit v1.2.3