Przeglądaj źródła

Update README for tvOS and include in travis (#587)

Paul Beusterien 8 lat temu
rodzic
commit
85c7a3b85c
2 zmienionych plików z 29 dodań i 10 usunięć
  1. 11 9
      README.md
  2. 18 1
      test.sh

+ 11 - 9
README.md

@@ -132,16 +132,18 @@ We've seen an amazing amount of interest and contributions to improve the Fireba
 very grateful!  We'd like to empower as many developers as we can to be able to use Firebase and
 participate in the Firebase community.
 
-### macOS
+### macOS and tvOS
 FirebaseAuth, FirebaseCore, FirebaseDatabase and FirebaseStorage now compile, run unit tests, and
-work on macOS, thanks to contributions from the community. There are a few tweaks needed, like
-ensuring iOS-only or macOS-only code is correctly guarded with checks for `TARGET_OS_IOS` and
-`TARGET_OS_OSX`.
-
-Keep in mind that macOS is not officially supported by Firebase, and this repository is actively
-developed primarily for iOS. While we can catch basic unit test issues with Travis, there may be
-some changes where the SDK no longer works as expected on macOS. If you encounter this, please
-[file an issue](https://github.com/firebase/firebase-ios-sdk/issues) for it.
+work on macOS and tvOS, thanks to contributions from the community. There are a few tweaks needed,
+like ensuring iOS-only, macOS-only, or tvOS-only code is correctly guarded with checks for
+`TARGET_OS_IOS`, `TARGET_OS_OSX` and `TARGET_OS_TV`.
+
+For tvOS, checkout the [Sample](Example/tvOSSample).
+
+Keep in mind that macOS and tvOS are not officially supported by Firebase, and this repository is
+actively developed primarily for iOS. While we can catch basic unit test issues with Travis, there
+may be some changes where the SDK no longer works as expected on macOS or tvOS. If you encounter
+this, please [file an issue](https://github.com/firebase/firebase-ios-sdk/issues).
 
 ## Roadmap
 

+ 18 - 1
test.sh

@@ -18,7 +18,7 @@ test_iOS() {
     -workspace Example/Firebase.xcworkspace \
     -scheme AllUnitTests_iOS \
     -sdk iphonesimulator \
-    -destination 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7' \
+    -destination 'platform=iOS Simulator,name=iPhone 7' \
     build \
     test \
     ONLY_ACTIVE_ARCH=YES \
@@ -39,6 +39,19 @@ test_macOS() {
     | xcpretty
 }
 
+test_tvOS() {
+  xcodebuild \
+    -workspace Example/Firebase.xcworkspace \
+    -scheme AllUnitTests_tvOS \
+    -sdk appletvsimulator \
+    -destination 'platform=tvOS Simulator,name=Apple TV' \
+    build \
+    test \
+    ONLY_ACTIVE_ARCH=YES \
+    CODE_SIGNING_REQUIRED=NO \
+    | xcpretty
+}
+
 test_iOS; RESULT=$?
 
 if [ $RESULT != 0 ]; then exit $RESULT; fi
@@ -54,5 +67,9 @@ fi
 
 if [ $RESULT != 0 ]; then exit $RESULT; fi
 
+test_tvOS; RESULT=$?
+
+if [ $RESULT != 0 ]; then exit $RESULT; fi
+
 # Also test Firestore
 Firestore/test.sh