-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[CLI Templates] Included NativeAnimation module on iOS in the starter project #10783
[CLI Templates] Included NativeAnimation module on iOS in the starter project #10783
Conversation
By analyzing the blame information on this pull request, we identified @jhen0409 and @callmephilip to be potential reviewers. |
What's the motivation behind this? Does this only prevent crashes for apps that use native Animated? |
@hramos Yes, we shipped native animations for touchables and soon NavigationExperimental so we should include it by default now. It is also already included on android. |
remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; | ||
sourceTree = BUILT_PRODUCTS_DIR; | ||
}; | ||
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = { |
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.
Is this intentional (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.
This was not intentional. If you try linking libRCTAnimation.a in "Build Phases" and check your project's diff, you'll see that Xcode has done this automatically. Should I remove this?
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 haven't done any Apple TV development yet, and I am not familiar with how Xcode handles static libraries for projects that may target tvOS. @dlowder-salesforce perhaps you can chime in?
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.
All libraries should have two targets now, one for iOS and one for tvOS. So this is probably correct. If you have integration test automation for the new library, and it is passing on tvOS, then the project is ok :)
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.
@hramos I just noticed that this is for generating starter iOS projects. From what I'm seeing, there are tvOS targets for the other libraries included, so this should be fine. At some point fairly soon, I'll get to supporting tvOS fully for starter projects.
LGTM, I'll let @hramos ship it. |
@janicduplessis Should I squash my commits or something? This is my first contribution to React Native :) |
Not needed. the bot will take care of it :) |
Great, thanks for your help reviewing this PR, @janicduplessis and @dlowder-salesforce. I can't import it just yet - we're holding off on updating app templates pending an improvement to how |
Yes this will likely cause conflicts when people run The new planned @facebook-github-bot shipit |
@mkonicek has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: Fixes facebook#10638. Added NativeAnimation library to the starter project iOS generator. Passing `useNativeDriver: true` to `Animated` config will enable the app to tap into the native code for animations. **Test plan** Init a RN project and animate an element. Enable native driver as follows: ``` Animated.timing( this.state.value, { toValue: 300, // some value useNativeDriver: true } ).start(); ``` Earlier, this used to crash. Closes facebook#10783 Differential Revision: D4159386 Pulled By: mkonicek fbshipit-source-id: 993481a31b4446eab24ef4ee35ae1941d7a7aae9
Summary: Fixes #10638. Added NativeAnimation library to the starter project iOS generator. Passing `useNativeDriver: true` to `Animated` config will enable the app to tap into the native code for animations. **Test plan** Init a RN project and animate an element. Enable native driver as follows: ``` Animated.timing( this.state.value, { toValue: 300, // some value useNativeDriver: true } ).start(); ``` Earlier, this used to crash. Closes facebook/react-native#10783 Differential Revision: D4159386 Pulled By: mkonicek fbshipit-source-id: 993481a31b4446eab24ef4ee35ae1941d7a7aae9
Fixes #10638.
Added NativeAnimation library to the starter project iOS generator. Passing
useNativeDriver: true
toAnimated
config will enable the app to tap into the native code for animations.Test plan
Init a RN project and animate an element. Enable native driver as follows:
Earlier, this used to crash.