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

As/tv os #49

Merged
merged 9 commits into from
Jan 9, 2017
Merged

As/tv os #49

merged 9 commits into from
Jan 9, 2017

Conversation

asowers1
Copy link
Contributor

@asowers1 asowers1 commented Jan 7, 2017

Summation of pull request

This PR is intends to add tvOS support to ConsistencyManager-iOS (which may have a confusing naming scheme if made multi-platform?)

Project additions

ConsistencyManager project:

  • Adds appletvos and appletvsimulator as supported platforms
  • Adds TARGETED_DEVICE_FAMILY 3 (for tvOS) in project file

SampleApp / ConsistencyManagerDemo project:

  • Adds ConsistencyManagerDemo-tvOS target to ConsistencyManagerDemo project
  • Ports ConsistencyManagerDemo to ConsistencyManagerDemo-tvOS
  • Adds ConsistencyManagerDemoTests files to ConsistencyManagerDemo-tvOSTests target membership

Cocoapods:

  • Suggests 5.1.0 pod release in podspec
  • Adds tvos requirements to podspec

Misc:

  • Some xibs opened with Xcode 8.2.1; automatically modified xib files

Demo app for tvOS:

simulator screen shot jan 7 2017 5 21 36 pm
simulator screen shot jan 7 2017 5 21 35 pm
simulator screen shot jan 7 2017 5 21 31 pm

Cool tidbits

Per http://promisekit.org/news/2016/08/Multiplatform-Single-Scheme-Xcode-Projects/, including tvOS support in the ConsistencyManager target.

@plivesey
Copy link
Owner

plivesey commented Jan 8, 2017

So first of all, thanks for the PR. Good point with -iOS. Created #50.

@plivesey
Copy link
Owner

plivesey commented Jan 8, 2017

Going to pull this down locally and take a look at the changes.

@asowers1
Copy link
Contributor Author

asowers1 commented Jan 8, 2017

👌

@plivesey plivesey self-assigned this Jan 8, 2017
@plivesey
Copy link
Owner

plivesey commented Jan 8, 2017

Going to look over the code. Mostly looks good but a couple of comments so far:

  1. In the demo app, there's still a scheme for ConsistencyManager which doesn't do anything anymore (UI shows it as a cog). Can we delete that?
  2. In the demo app, there's some code which is exactly the same. Can we move that to a shared folder or something and just add it to both targets? I think just the models and the Network folder.

Copy link
Owner

@plivesey plivesey left a comment

Choose a reason for hiding this comment

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

Can you also make it so that we run tests on tvOS. you need to edit the build.sh and add another clean derived data and run tests on the right sdk. Something like:

rm -rf $DERIVED_DATA &&
time xcodebuild clean test \
    -project ConsistencyManager.xcodeproj \
    -scheme ConsistencyManager \
    -sdk macosx \ <--- this should be tvOS though? or something?
    -derivedDataPath $DERIVED_DATA \
    | tee build.log \
    | xcpretty &&

We don't test the demo app with travis btw, so just the main project.

@@ -3,6 +3,7 @@
[![Build Status](https://travis-ci.org/linkedin/ConsistencyManager-iOS.svg?branch=master)](https://travis-ci.org/linkedin/ConsistencyManager-iOS)
[![codecov](https://codecov.io/gh/linkedin/ConsistencyManager-iOS/branch/master/graph/badge.svg)](https://codecov.io/gh/linkedin/ConsistencyManager-iOS)
[![GitHub release](https://img.shields.io/github/release/linkedin/ConsistencyManager-iOS.svg?maxAge=86400)](https://github.com/linkedin/ConsistencyManager-iOS/releases)
![Platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS%20%7C%20macOS-blue.svg)
Copy link
Owner

Choose a reason for hiding this comment

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

Nice. Thanks.


import XCTest

class ConsistencyManagerDemo_tvOSUITests: XCTestCase {
Copy link
Owner

Choose a reason for hiding this comment

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

Can we remove these UI tests? I highly doubt we'll ever write UI tests for the demo app and it's just cruft.

Copy link
Contributor Author

@asowers1 asowers1 Jan 9, 2017

Choose a reason for hiding this comment

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

This should probably do it for xcodebuild: rm -rf $DERIVED_DATA && time xcodebuild clean build \ -project ConsistencyManager.xcodeproj \ -scheme ConsistencyManager \ -sdk appletvsimulator10.0 \ -derivedDataPath $DERIVED_DATA \ -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' \ | tee build.log \ | xcpretty &&

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@plivesey
Copy link
Owner

plivesey commented Jan 9, 2017

Left a couple of comments on the code too, but all minor stuff. Then can merge this in. :D

@asowers1
Copy link
Contributor Author

asowers1 commented Jan 9, 2017

I'll patch these up and push 👍

… test class, added tvOS xcodebuild in build.sh
@asowers1
Copy link
Contributor Author

asowers1 commented Jan 9, 2017

I'm not seeing the empty scheme for ConsistencyManager in the SampleApp project. Is it still in there after this push?

@plivesey
Copy link
Owner

plivesey commented Jan 9, 2017

I'll check on the empty scheme, but don't worry about that either way. It may be a local thing, and we can delete that later. Checking changes.

@plivesey
Copy link
Owner

plivesey commented Jan 9, 2017

Yep. LGTM. Merging.

@plivesey plivesey merged commit a93c001 into plivesey:master Jan 9, 2017
@asowers1
Copy link
Contributor Author

asowers1 commented Jan 9, 2017

🎉 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants