diff options
author | Paul Beusterien <paulbeusterien@google.com> | 2018-01-03 12:12:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-03 12:12:22 -0800 |
commit | f08b5044d64197a3227017ad44235a2bd7421691 (patch) | |
tree | 0ea97726a39d1746acf260f42ef35c18f363f4e2 /Firebase/Core | |
parent | 9179dd86bfa507ede505c788a513e3824ad01856 (diff) |
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
Diffstat (limited to 'Firebase/Core')
-rw-r--r-- | Firebase/Core/FIRNetworkURLSession.m | 1 | ||||
-rw-r--r-- | Firebase/Core/FIRReachabilityChecker.m | 4 | ||||
-rw-r--r-- | Firebase/Core/third_party/FIRAppEnvironmentUtil.m | 10 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Firebase/Core/FIRNetworkURLSession.m b/Firebase/Core/FIRNetworkURLSession.m index d9c6f3a..c3da674 100644 --- a/Firebase/Core/FIRNetworkURLSession.m +++ b/Firebase/Core/FIRNetworkURLSession.m @@ -428,6 +428,7 @@ - (NSURLSessionConfiguration *)backgroundSessionConfigWithSessionID:(NSString *)sessionID { #if (TARGET_OS_OSX && defined(MAC_OS_X_VERSION_10_10) && \ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) || \ + TARGET_OS_TV || \ (TARGET_OS_IOS && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0) // iOS 8/10.10 builds require the new backgroundSessionConfiguration method name. diff --git a/Firebase/Core/FIRReachabilityChecker.m b/Firebase/Core/FIRReachabilityChecker.m index 733dffe..cac87ff 100644 --- a/Firebase/Core/FIRReachabilityChecker.m +++ b/Firebase/Core/FIRReachabilityChecker.m @@ -177,7 +177,7 @@ static NSString *const kFIRReachabilityDisconnectedStatus = @"Disconnected"; // Reachable flag is set. Check further flags. if (!(flags & kSCNetworkReachabilityFlagsConnectionRequired)) { // Connection required flag is not set, so we have connectivity. -#if TARGET_OS_IOS +#if TARGET_OS_IOS || TARGET_OS_TV status = (flags & kSCNetworkReachabilityFlagsIsWWAN) ? kFIRReachabilityViaCellular : kFIRReachabilityViaWifi; #elif TARGET_OS_OSX @@ -188,7 +188,7 @@ static NSString *const kFIRReachabilityDisconnectedStatus = @"Disconnected"; !(flags & kSCNetworkReachabilityFlagsInterventionRequired)) { // If the connection on demand or connection on traffic flag is set, and user intervention // is not required, we have connectivity. -#if TARGET_OS_IOS +#if TARGET_OS_IOS || TARGET_OS_TV status = (flags & kSCNetworkReachabilityFlagsIsWWAN) ? kFIRReachabilityViaCellular : kFIRReachabilityViaWifi; #elif TARGET_OS_OSX diff --git a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m index 859c04e..90e66f0 100644 --- a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m +++ b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m @@ -177,7 +177,7 @@ static BOOL isAppEncrypted() { } + (BOOL)hasEmbeddedMobileProvision { - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV return [[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"].length > 0; #elif TARGET_OS_OSX return NO; @@ -185,7 +185,7 @@ static BOOL isAppEncrypted() { } + (BOOL)isSimulator { - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV NSString *platform = [FIRAppEnvironmentUtil deviceModel]; return [platform isEqual:@"x86_64"] || [platform isEqual:@"i386"]; #elif TARGET_OS_OSX @@ -207,7 +207,7 @@ static BOOL isAppEncrypted() { } + (NSString *)systemVersion { - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV return [UIDevice currentDevice].systemVersion; #elif TARGET_OS_OSX return [NSProcessInfo processInfo].operatingSystemVersionString; @@ -215,7 +215,7 @@ static BOOL isAppEncrypted() { } + (BOOL)isAppExtension { - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV // Documented by <a href="https://goo.gl/RRB2Up">Apple</a> BOOL appExtension = [[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"]; return appExtension; @@ -227,7 +227,7 @@ static BOOL isAppEncrypted() { #pragma mark - Helper methods + (BOOL)hasSCInfoFolder { - #if TARGET_OS_IOS + #if TARGET_OS_IOS || TARGET_OS_TV NSString *bundlePath = [NSBundle mainBundle].bundlePath; NSString *scInfoPath = [bundlePath stringByAppendingPathComponent:@"SC_Info"]; return [[NSFileManager defaultManager] fileExistsAtPath:scInfoPath]; |