Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created tvOS Example Pack #141

Closed
wants to merge 14 commits into from
26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@ env:
- TVOS_SDK=appletvsimulator10.0

matrix:
- DESTINATION="OS=8.1,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_IOS_EXAMPLE="YES" BUILD_TVOS_EXAMPLE="NO" POD_LINT="YES"
- DESTINATION="OS=8.2,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.3,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.1,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=8.2,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.3,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="OS=9.0,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_IOS_EXAMPLE="YES" BUILD_TVOS_EXAMPLE="NO" POD_LINT="YES"
- DESTINATION="OS=9.1,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.3,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.0,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=9.1,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.3,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="OS=10.0,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_IOS_EXAMPLE="YES" BUILD_TVOS_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=10.0,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"

- DESTINATION="OS=9.0,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=10.0,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" BUILD_IOS_EXAMPLE="NO" BUILD_TVOS_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.0,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=10.0,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"

script:
- if [ $POD_LINT == "YES" ]; then
bundle exec pod lib lint;
fi


- if [ $BUILD_IOS_EXAMPLE == "YES" ]; then
- if [ $BUILD_EXAMPLE == "YES" && $SDK == $IOS_SDK ]; then
xcodebuild build -workspace Example/IGListKitExamples.xcworkspace -scheme IGListKitExamples -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revert these changes. Instead, inside of this if we can check the value of $SDK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, much better idea! Admittedly not my strong point!

fi


- if [ $BUILD_TVOS_EXAMPLE == "YES" ]; then
- if [ $BUILD_EXAMPLE == "YES" && $SDK == $TVOS_SDK ]; then
xcodebuild build -workspace Examples-tvOS/IGListKitExamples.xcworkspace -scheme IGListKitExamples -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c;
fi

Expand Down
2 changes: 1 addition & 1 deletion Examples-tvOS/IGListKitExamples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import UIKit
import IGListKit

class CarouselSectionController: IGListSectionController, IGListSectionType {
final class CarouselSectionController: IGListSectionController, IGListSectionType {

var number: Int?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import UIKit
import IGListKit

class DemoItem: NSObject {
final class DemoItem: NSObject {

let name: String
let controllerClass: UIViewController.Type
Expand All @@ -31,7 +31,7 @@ class DemoItem: NSObject {

}

class DemoSectionController: IGListSectionController, IGListSectionType {
final class DemoSectionController: IGListSectionController, IGListSectionType {

var object: DemoItem?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import UIKit
import IGListKit

class HorizontalSectionController: IGListSectionController, IGListSectionType, IGListAdapterDataSource {
final class HorizontalSectionController: IGListSectionController, IGListSectionType, IGListAdapterDataSource {

var number: Int?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import UIKit
import IGListKit

class LabelSectionController: IGListSectionController, IGListSectionType {
final class LabelSectionController: IGListSectionController, IGListSectionType {

var object: String?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import UIKit
import IGListKit

class DemosViewController: UIViewController, IGListAdapterDataSource {
final class DemosViewController: UIViewController, IGListAdapterDataSource {

lazy var adapter: IGListAdapter = {
return IGListAdapter(updater: IGListAdapterUpdater(), viewController: self, workingRangeSize: 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import UIKit
import IGListKit

class NestedAdapterViewController: UIViewController, IGListAdapterDataSource {
final class NestedAdapterViewController: UIViewController, IGListAdapterDataSource {

lazy var adapter: IGListAdapter = {
return IGListAdapter(updater: IGListAdapterUpdater(), viewController: self, workingRangeSize: 0)
Expand Down
2 changes: 1 addition & 1 deletion Examples-tvOS/IGListKitExamples/Views/CarouselCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

class CarouselCell: UICollectionViewCell {
final class CarouselCell: UICollectionViewCell {
@IBOutlet weak var titleLabel: UILabel!

override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) {
Expand Down
2 changes: 1 addition & 1 deletion Examples-tvOS/IGListKitExamples/Views/DemoCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import UIKit

class DemoCell: UICollectionViewCell {
final class DemoCell: UICollectionViewCell {

lazy var label: UILabel = {
let view = UILabel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import UIKit
import IGListKit

class EmbeddedCollectionViewCell: UICollectionViewCell {
final class EmbeddedCollectionViewCell: UICollectionViewCell {

lazy var collectionView: IGListCollectionView = {
let layout = UICollectionViewFlowLayout()
Expand Down
2 changes: 1 addition & 1 deletion Examples-tvOS/IGListKitExamples/Views/LabelCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import UIKit

class LabelCell: UICollectionViewCell {
final class LabelCell: UICollectionViewCell {

fileprivate static let insets = UIEdgeInsets(top: 8, left: 15, bottom: 8, right: 15)
fileprivate static let font = UIFont.systemFont(ofSize: 40)
Expand Down
2 changes: 1 addition & 1 deletion Examples-tvOS/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 4bdfb42d1e7b2b121bf8c83bc300d7d77aa0fc3a

COCOAPODS: 1.0.1
COCOAPODS: 1.1.1
2 changes: 1 addition & 1 deletion Examples-tvOS/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading