-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Apple TV support 5: adjustments after manual import of #10427 #11548
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
Conversation
By analyzing the blame information on this pull request, we identified @javache and @skv-headless to be potential reviewers. |
@javache these are the only changes I found that should be needed after merging your manual import of Apple TV code to my repo. |
@@ -39,7 +39,11 @@ @implementation RCTPlatform | |||
@"forceTouchAvailable": @(RCTForceTouchAvailable()), | |||
@"osVersion": [device systemVersion], | |||
@"systemName": [device systemName], | |||
#if TARGET_OS_TV | |||
@"interfaceIdiom": interfaceIdiom(UIUserInterfaceIdiomTV), | |||
#else | |||
@"interfaceIdiom": interfaceIdiom([device userInterfaceIdiom]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this manually and I don't understand why you need to TARGET_OS_TV, [device userInterfaceIdiom]
should already return the right thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but am having difficulty finding definite Apple documentation stating that [device userInterfaceIdiom] will return this value if and only if the code is running on Apple TV. I'll replace this with a comment, so we can more easily find the issue if Apple changes things underneath us in the future....
@@ -39,6 +39,8 @@ @implementation RCTPlatform | |||
@"forceTouchAvailable": @(RCTForceTouchAvailable()), | |||
@"osVersion": [device systemVersion], | |||
@"systemName": [device systemName], | |||
// userInterfaceIdiom should return UIUserInterfaceIdiomTV if and only if we are running on Apple TV. | |||
// If this ever changes, we may need to adjust this code to avoid breakage when running on tvOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really think we need this comment, it's really just repeating the documentation for [device userInterfaceIdiom]
@facebook-github-bot shipit |
@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: **Motivation** After reviewing changes between my PR facebook#10427 and what was eventually manually imported to master, found two minor adjustments needed. **Test plan** Existing tests should still pass. Closes facebook#11548 Differential Revision: D4357216 Pulled By: javache fbshipit-source-id: 571794cda104210bf5236462c0700e07a2a51d29
Summary: **Motivation** After reviewing changes between my PR facebook#10427 and what was eventually manually imported to master, found two minor adjustments needed. **Test plan** Existing tests should still pass. Closes facebook#11548 Differential Revision: D4357216 Pulled By: javache fbshipit-source-id: 571794cda104210bf5236462c0700e07a2a51d29
Motivation
After reviewing changes between my PR #10427 and what was eventually manually imported to master, found two minor adjustments needed.
Test plan
Existing tests should still pass.