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

Include the NativeAnimation module on iOS in the starter project #10638

Closed
janicduplessis opened this issue Oct 31, 2016 · 2 comments
Closed
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@janicduplessis
Copy link
Contributor

https://github.com/facebook/react-native/tree/master/Libraries/NativeAnimation should be included when creating a new project. We will want to use native animations in react-native core so having it included by default makes sense. It is also included by default on Android now.

@janicduplessis janicduplessis added Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Platform: iOS iOS applications. Help Wanted :octocat: Issues ideal for external contributors. labels Oct 31, 2016
@petrgazarov
Copy link

I'm new to the codebase and would like to take this on if that's alright. I looked around and couldn't find where this logic lives. Perhaps if you have a minute, can you point out where/how it is included on Android? Also, some steps to test expected behavior. Should there be an automated test? Thanks!!

@sreejithr
Copy link
Contributor

sreejithr commented Nov 7, 2016

@janicduplessis I've made a pull request here. I added the ../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj file and linked libRCTAnimation.a, in local-cli/generator-ios/templates/xcodeproj/project.pbxproj.

Do let me know if everything is OK. I published my branch in Sinopia and tried having useNativeDriver. No errors. Animation works. Thank you.

emmenko added a commit to commercetools/react-native-dashboard that referenced this issue Nov 26, 2016
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this issue Jan 4, 2017
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
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants