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
Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh) #10227
Conversation
Hmmm... Travis CI failed because their build doesn't have a tvOS 10 simulator. Will downgrade the build targets and see if that fixes it. |
@dlowder-salesforce updated the pull request - view changes |
@dlowder-salesforce updated the pull request - view changes |
@javache here is Apple TV round 2 :) |
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.
Looks good!
@@ -946,6 +955,9 @@ - (type)getter \ | |||
#if !TARGET_OS_TV | |||
RCT_SET_AND_PRESERVE_OFFSET(setPagingEnabled, isPagingEnabled, BOOL) | |||
RCT_SET_AND_PRESERVE_OFFSET(setScrollsToTop, scrollsToTop, BOOL) | |||
#else | |||
RCT_EMPTY_BOOL_GETTER_SETTER(setPagingEnabled, isPagingEnabled) |
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.
Why is this necessary? I believe RN wil automatically ignore attributes that are not exported by a view manager (which is how we OS-specific attributes)
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.
If I didn't make this change, I got an "unrecognized selector" [RCTScrollView setScrollsToTop] when attempting to run a modified version of UIExplorer to try some of the snapshot tests.
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.
Thanks to your hint I found the correct way to do this... committing a fix.
@@ -14,7 +14,7 @@ case "$CONFIGURATION" in | |||
Debug) | |||
# Speed up build times by skipping the creation of the offline package for debug | |||
# builds on the simulator since the packager is supposed to be running anyways. | |||
if [[ "$PLATFORM_NAME" = "iphonesimulator" ]]; then | |||
if [[ "$PLATFORM_NAME" = "iphonesimulator" || "$PLATFORM_NAME" = "appletvsimulator" ]]; then |
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.
Maybe regex match on 'simulator$'?
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.
Done.
@dlowder-salesforce updated the pull request - view changes |
@dlowder-salesforce updated the pull request - view changes |
@dlowder-salesforce updated the pull request - view changes |
@@ -73,6 +73,7 @@ - (void)tearDown | |||
|
|||
- (void)testBundleURL | |||
{ | |||
#if !TARGET_OS_TV |
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.
How is this this test broken 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.
Maybe this is an issue with the new Xcode and not with tvOS, but the URL string was using the IP address of the host instead of "localhost". I can revert this change and see if it passes in CI.
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.
Reverted.
@@ -97,7 +97,6 @@ RCT_EXTERN NSString *const RCTUIManagerRootViewKey; | |||
* @param reactTag the component tag | |||
* @param completion the completion block that will hand over the rootView, if any. | |||
* | |||
* @return the rootView |
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.
Revert?
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.
That change fixes an actual doc error -- the method does not in fact return anything.
2D3B5EEF1D9B09DC00451313 /* RCTViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E0674E1A70F44B002CDEE1 /* RCTViewManager.m */; }; | ||
2D3B5EF01D9B09E300451313 /* RCTWrapperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B080241A694A8400A75B9A /* RCTWrapperViewController.m */; }; | ||
2D3B5EF11D9B09E700451313 /* UIView+React.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E067541A70F44B002CDEE1 /* UIView+React.m */; }; | ||
2D8C2E331DA40441000EE098 /* RCTMultipartStreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCCF1D8381DE008E587E /* RCTMultipartStreamReader.m */; }; |
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.
Any idea why all of these were added?
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.
Those are to include the files in the tvOS build.
@@ -73,5 +72,7 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations | |||
return _supportedInterfaceOrientations; | |||
} | |||
#endif | |||
#endif |
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.
Can you add a comment here to clarify what each of the if's are closing?
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.
Done.
@@ -930,7 +930,7 @@ - (type)getter \ | |||
{ \ | |||
return [_scrollView getter]; \ | |||
} | |||
|
|||
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.
Revert :)
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.
Done.
@dlowder-salesforce updated the pull request - view changes |
@dlowder-salesforce updated the pull request - view changes |
@facebook-github-bot shipit |
Thanks for importing. If you are a Facebook employee, you can view this diff on Phabricator. |
@dlowder-salesforce, I think this PR's unit tests are consistently failing:
|
Weird.... the tests were passing locally. |
It could be sensitive to CI device performance or XCode version On 6 October 2016 at 00:36, douglowder notifications@github.com wrote:
|
Hmmm maybe put the Apple TV objc-test.sh in a separate script? |
Yeah, let's give it a try. On Thursday, 6 October 2016, douglowder notifications@github.com wrote:
|
Summary: * Motivation * Second PR for Apple TV support. * Test plan * Apple TV tests have been added to scripts/objc-test.sh Closes facebook/react-native#10227 Differential Revision: D3974064 Pulled By: javache fbshipit-source-id: 36dffb4517efa489e40fa713a30655d1d76ef646
Summary: * Motivation * Second PR for Apple TV support. * Test plan * Apple TV tests have been added to scripts/objc-test.sh Closes facebook/react-native#10227 Differential Revision: D3974064 Pulled By: javache fbshipit-source-id: 36dffb4517efa489e40fa713a30655d1d76ef646
Second PR for Apple TV support.
Apple TV tests have been added to scripts/objc-test.sh