Skip to content

Commit cd0fc65

Browse files
paulb777ryanwilson
authored andcommitted
Firebase Core and its unit tests for tvOS (#449)
* Core Unit Tests for tvOS * tvOS 10 and shared schemes * copyrights * style fixes
1 parent 7d25a7c commit cd0fc65

File tree

35 files changed

+1076
-11
lines changed

35 files changed

+1076
-11
lines changed

Example/Core/App/tvOS/AppDelegate.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2017 Google
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#import <UIKit/UIKit.h>
16+
17+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
18+
19+
@property(strong, nonatomic) UIWindow *window;
20+
21+
@end

Example/Core/App/tvOS/AppDelegate.m

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright 2017 Google
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
@import FirebaseCommunity;
16+
17+
#import "AppDelegate.h"
18+
19+
@interface AppDelegate ()
20+
21+
@end
22+
23+
@implementation AppDelegate
24+
25+
- (BOOL)application:(UIApplication *)application
26+
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
27+
// Override point for customization after application launch.
28+
[FIRApp configure];
29+
return YES;
30+
}
31+
32+
- (void)applicationWillResignActive:(UIApplication *)application {
33+
// Sent when the application is about to move from active to inactive state. This can occur for
34+
// certain types of temporary interruptions (such as an incoming phone call or SMS message) or
35+
// when the user quits the application and it begins the transition to the background state. Use
36+
// this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates.
37+
// Games should use this method to pause the game.
38+
}
39+
40+
- (void)applicationDidEnterBackground:(UIApplication *)application {
41+
// Use this method to release shared resources, save user data, invalidate timers, and store
42+
// enough application state information to restore your application to its current state in case
43+
// it is terminated later. If your application supports background execution, this method is
44+
// called instead of applicationWillTerminate: when the user quits.
45+
}
46+
47+
- (void)applicationWillEnterForeground:(UIApplication *)application {
48+
// Called as part of the transition from the background to the active state; here you can undo
49+
// many of the changes made on entering the background.
50+
}
51+
52+
- (void)applicationDidBecomeActive:(UIApplication *)application {
53+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If
54+
// the application was previously in the background, optionally refresh the user interface.
55+
}
56+
57+
- (void)applicationWillTerminate:(UIApplication *)application {
58+
// Called when the application is about to terminate. Save data if appropriate. See also
59+
// applicationDidEnterBackground:.
60+
}
61+
62+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv"
5+
}
6+
],
7+
"info" : {
8+
"version" : 1,
9+
"author" : "xcode"
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"layers" : [
3+
{
4+
"filename" : "Front.imagestacklayer"
5+
},
6+
{
7+
"filename" : "Middle.imagestacklayer"
8+
},
9+
{
10+
"filename" : "Back.imagestacklayer"
11+
}
12+
],
13+
"info" : {
14+
"version" : 1,
15+
"author" : "xcode"
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv"
5+
}
6+
],
7+
"info" : {
8+
"version" : 1,
9+
"author" : "xcode"
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv"
5+
}
6+
],
7+
"info" : {
8+
"version" : 1,
9+
"author" : "xcode"
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
10+
}
11+
],
12+
"info" : {
13+
"version" : 1,
14+
"author" : "xcode"
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"layers" : [
3+
{
4+
"filename" : "Front.imagestacklayer"
5+
},
6+
{
7+
"filename" : "Middle.imagestacklayer"
8+
},
9+
{
10+
"filename" : "Back.imagestacklayer"
11+
}
12+
],
13+
"info" : {
14+
"version" : 1,
15+
"author" : "xcode"
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
10+
}
11+
],
12+
"info" : {
13+
"version" : 1,
14+
"author" : "xcode"
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
10+
}
11+
],
12+
"info" : {
13+
"version" : 1,
14+
"author" : "xcode"
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"assets" : [
3+
{
4+
"size" : "1280x768",
5+
"idiom" : "tv",
6+
"filename" : "App Icon - App Store.imagestack",
7+
"role" : "primary-app-icon"
8+
},
9+
{
10+
"size" : "400x240",
11+
"idiom" : "tv",
12+
"filename" : "App Icon.imagestack",
13+
"role" : "primary-app-icon"
14+
},
15+
{
16+
"size" : "2320x720",
17+
"idiom" : "tv",
18+
"filename" : "Top Shelf Image Wide.imageset",
19+
"role" : "top-shelf-image-wide"
20+
},
21+
{
22+
"size" : "1920x720",
23+
"idiom" : "tv",
24+
"filename" : "Top Shelf Image.imageset",
25+
"role" : "top-shelf-image"
26+
}
27+
],
28+
"info" : {
29+
"version" : 1,
30+
"author" : "xcode"
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
10+
}
11+
],
12+
"info" : {
13+
"version" : 1,
14+
"author" : "xcode"
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "tv",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "tv",
9+
"scale" : "2x"
10+
}
11+
],
12+
"info" : {
13+
"version" : 1,
14+
"author" : "xcode"
15+
}
16+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"images" : [
3+
{
4+
"orientation" : "landscape",
5+
"idiom" : "tv",
6+
"extent" : "full-screen",
7+
"minimum-system-version" : "11.0",
8+
"scale" : "2x"
9+
},
10+
{
11+
"orientation" : "landscape",
12+
"idiom" : "tv",
13+
"extent" : "full-screen",
14+
"minimum-system-version" : "9.0",
15+
"scale" : "1x"
16+
}
17+
],
18+
"info" : {
19+
"version" : 1,
20+
"author" : "xcode"
21+
}
22+
}

Example/Core/App/tvOS/Info.plist

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>APPL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
<key>LSRequiresIPhoneOS</key>
22+
<true/>
23+
<key>UIMainStoryboardFile</key>
24+
<string>Main</string>
25+
<key>UIRequiredDeviceCapabilities</key>
26+
<array>
27+
<string>arm64</string>
28+
</array>
29+
<key>UIUserInterfaceStyle</key>
30+
<string>Automatic</string>
31+
</dict>
32+
</plist>

0 commit comments

Comments
 (0)