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
Closed

Conversation

Sherlouk
Copy link
Contributor

@Sherlouk Sherlouk commented Oct 30, 2016

Changes in this pull request

  • Created a new workspace for tvOS examples w/ Cocoapods & dependency on IGListKit
  • Created a demo chooser across the same lines as the iOS equivalent
  • Duplicated the 'Nested Adapter' example from iOS pack to the tvOS example
    • Uses native navigation to get around, created focus/active states for cells
  • Updated travis.yml to optionally build tvOS example pack

Note: Not added any imagery/icons/etc due to the much larger & different sizes required - If they're desired then someone with skills will need to provide them!

Closes #138
Relates to #137

Pull request checklist

@Sherlouk Sherlouk changed the title Tv os example Created tvOS Example Pack Oct 30, 2016
@facebook-github-bot
Copy link
Contributor

@Sherlouk updated the pull request - view changes

@coveralls
Copy link

coveralls commented Oct 30, 2016

Coverage Status

Coverage remained the same at 86.482% when pulling e2f042f on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

@facebook-github-bot
Copy link
Contributor

@Sherlouk updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@Sherlouk updated the pull request - view changes

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.482% when pulling 120244e on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

@Sherlouk
Copy link
Contributor Author

Having a few issues with the travis change, wasn't working locally when I tried but a few retrys later it worked locally.

Would appreciate some help with that!

@rnystrom
Copy link
Contributor

rnystrom commented Nov 3, 2016

@Sherlouk It looks like Travis is timing out from a build issue. You should be able to run this locally:

$ xcodebuild build -workspace Examples-tvOS/IGListKitExamples.xcworkspace -scheme IGListKitExamples -sdk "$TVOS_SDK" -destination "OS=9.0,name=Apple TV 1080p" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO -verbose

That's the command its timing out on (+ -verbose): https://travis-ci.org/Instagram/IGListKit/jobs/171743818

Also I've literally never built an Apple TV app, so I'm pretty n00b when it comes to that 🙊

Copy link
Contributor

@jessesquires jessesquires left a comment

Choose a reason for hiding this comment

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

Thanks @Sherlouk !

Let's mark all these new classes final, too


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


- if [ $BUILD_EXAMPLE == "YES" ]; then
- if [ $BUILD_IOS_EXAMPLE == "YES" ]; 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!


PODFILE CHECKSUM: 4bdfb42d1e7b2b121bf8c83bc300d7d77aa0fc3a

COCOAPODS: 1.0.1
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 use 1.1.1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Left it as default, will change

@Sherlouk
Copy link
Contributor Author

Sherlouk commented Nov 3, 2016

With regards to Travis, definitely not my strong point but will try and get it working (will make the suggested changes first!)

Definitely happy with making things final and updating the cocoapods version.

Are we satisfied with the demo I chose to do/the chooser I implemented?

I'm actually with you @rnystrom I've actually never done tvOS hence why I wanted to do this to try and learn something new :) (Had fun learning how to focus cells and doing all that!)

@facebook-github-bot
Copy link
Contributor

@Sherlouk updated the pull request - view changes

@Sherlouk
Copy link
Contributor Author

Sherlouk commented Nov 5, 2016

Travis hasn't run yet, but I haven't changed the build command so I doubt the result will change.

When I ran the build command locally it didn't work at first, it stalled because I had a different build of xcode open than it wanted to use. It was forcing itself to use xcode 8 but I had 8.beta2 open. I closed it, and reran the command and it worked perfectly.

I've updated my local version of cocoapods to 1.1.1, made classes final and made the travis file a bit cleaner as per requests.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 86.499% when pulling 5d019e7 on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 86.499% when pulling 5d019e7 on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

@Sherlouk
Copy link
Contributor Author

Sherlouk commented Nov 5, 2016

As much as I'd love to say I fixed it -- I broke the build shell script. 🙈

Working on it

@facebook-github-bot
Copy link
Contributor

@Sherlouk updated the pull request - view changes

@Sherlouk
Copy link
Contributor Author

Sherlouk commented Nov 5, 2016

Failed in same place, but no closer to finding the actual issue.

As I mentioned previously working fine when running locally, so let's just ship my machine!

But in all seriousness, any ideas @rnystrom ?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 86.499% when pulling f29648a on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 86.499% when pulling f29648a on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

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


Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@jessesquires
Copy link
Contributor

@Sherlouk -- are the tvOS example schemes shared?

@facebook-github-bot
Copy link
Contributor

@Sherlouk updated the pull request - view changes

@Sherlouk
Copy link
Contributor Author

Sherlouk commented Nov 5, 2016

@jessesquires Yeah, obviously, who would forget to do that? Insane idea!

(oops)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 86.499% when pulling 94e5116 on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 86.499% when pulling 94e5116 on Sherlouk:tvOS-example into 9e8ad96 on Instagram:master.

@Sherlouk
Copy link
Contributor Author

Sherlouk commented Nov 5, 2016

That was slightly embarrassing. 😓

Thanks Jesse!

@rnystrom
Copy link
Contributor

rnystrom commented Nov 7, 2016

@Sherlouk what's the reasoning behind another sample project vs adding this all to the existing one?

screen shot 2016-11-07 at 9 50 13 am

IMO I'd like to keep the top-level dir as trim as possible (which is becoming tough). Can we not add this to the existing sample project? Maybe I missed something?

@Sherlouk
Copy link
Contributor Author

Sherlouk commented Nov 7, 2016

@rnystrom It originally was all in one project file, but redid it all in a fresh project file as per @jessesquires' comments (#138 (comment))

Edit://
I see a few options here, we leave it as it is and have top level functions for iOS, tvOS and soon macOS. We have a single 'Examples' folder with subdirectories for 'iOS', 'macOS', and 'tvOS'. Or we have one project file with everything in.

I have no real preference, but I do think one project file might get a bit unmanageable over time especially with things like Today/iMessage schemes which only work on iOS etc etc

@Sherlouk
Copy link
Contributor Author

@rnystrom @jessesquires

Any note on what I need to do to move this forward?

@jessesquires
Copy link
Contributor

@rnystrom -- Yeah, I think we should have a separate tvOS example project.

Let's keep directories how they are for this PR and follow up after.

Here's what I propose:

|-- Examples/
    |-- Examples-iOS/
    |-- Examples-tvOS/

@jessesquires
Copy link
Contributor

I think we're good to go here.

@rnystrom -- Any other review comments?

@Sherlouk -- Sorry for the delay here! Looks like there's one conflict in CHANGELOG.md. Sorry about that. Should be easy to fix though.

Follow up task to clean up directories: #202

@facebook-github-bot
Copy link
Contributor

@Sherlouk updated the pull request - view changes

@Sherlouk
Copy link
Contributor Author

@jessesquires Not a problem, was waiting for everybody to be happy before fixing it as other PRs kept making it conflict!

Should all work now 🙏

@rnystrom
Copy link
Contributor

Let's land it! 🚀 🚀 🚀

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.441% when pulling 61e8eab on Sherlouk:tvOS-example into 204f7d5 on Instagram:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.441% when pulling 61e8eab on Sherlouk:tvOS-example into 204f7d5 on Instagram:master.

@facebook-github-bot
Copy link
Contributor

@rnystrom has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@jessesquires jessesquires added this to the 2.0.0 milestone Nov 16, 2016
@Sherlouk Sherlouk deleted the tvOS-example branch December 30, 2016 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants