Skip to content

Commit 9158d24

Browse files
committed
added react native animated and updated Podfile
1 parent 319eef8 commit 9158d24

File tree

11 files changed

+8642
-3
lines changed

11 files changed

+8642
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# Xcode
66
#
7+
*/Pods/
78
build/
89
*.pbxuser
910
!default.pbxuser

android/app/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ android {
138138
}
139139

140140
dependencies {
141+
implementation project(':react-native-reanimated')
141142
implementation fileTree(dir: "libs", include: ["*.jar"])
142143
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
143144
implementation "com.facebook.react:react-native:+" // From node_modules

android/app/src/main/java/com/rnstarterkit/MainActivity.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package com.rnstarterkit;
22

33
import com.facebook.react.ReactActivity;
4+
import com.facebook.react.ReactActivityDelegate;
5+
import com.facebook.react.ReactRootView;
6+
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
7+
48

59
public class MainActivity extends ReactActivity {
610

@@ -12,4 +16,14 @@ public class MainActivity extends ReactActivity {
1216
protected String getMainComponentName() {
1317
return "RNStarterKit";
1418
}
19+
20+
@Override
21+
protected ReactActivityDelegate createReactActivityDelegate() {
22+
return new ReactActivityDelegate(this, getMainComponentName()) {
23+
@Override
24+
protected ReactRootView createRootView() {
25+
return new RNGestureHandlerEnabledRootView(MainActivity.this);
26+
}
27+
};
28+
}
1529
}

android/app/src/main/java/com/rnstarterkit/MainApplication.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import com.swmansion.reanimated.ReanimatedPackage;
67
import com.facebook.react.ReactNativeHost;
78
import com.facebook.react.ReactPackage;
89
import com.facebook.react.shell.MainReactPackage;
@@ -22,7 +23,8 @@ public boolean getUseDeveloperSupport() {
2223
@Override
2324
protected List<ReactPackage> getPackages() {
2425
return Arrays.<ReactPackage>asList(
25-
new MainReactPackage()
26+
new MainReactPackage(),
27+
new ReanimatedPackage()
2628
);
2729
}
2830

android/settings.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
rootProject.name = 'RNStarterKit'
2+
include ':react-native-reanimated'
3+
project(':react-native-reanimated').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-reanimated/android')
24

35
include ':app'

ios/Podfile

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Uncomment the next line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
target 'RNStarterKit' do
5+
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
6+
# use_frameworks!
7+
8+
########
9+
# RNGestureHandler install older version of React (0.11.0). To prevent it, below code is added
10+
# https://facebook.github.io/react-native/docs/integration-with-existing-apps#configuring-cocoapods-dependencies
11+
pod 'React', :path => '../node_modules/react-native', :subspecs => [
12+
'Core',
13+
'CxxBridge', # Include this for RN >= 0.47
14+
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
15+
'RCTText',
16+
'RCTNetwork',
17+
'RCTWebSocket', # Needed for debugging
18+
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
19+
# Add any other subspecs you want to use in your project
20+
]
21+
# Explicitly include Yoga if you are using RN >= 0.42.0
22+
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
23+
24+
# Third party deps podspec link
25+
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
26+
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
27+
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
28+
########
29+
30+
end
31+
32+
# Multiple commands produce error when building with new Xcode build system
33+
# due to React and Yoga pods
34+
# https://github.com/facebook/react-native/issues/20492
35+
post_install do |installer|
36+
installer.pods_project.targets.each do |target|
37+
if target.name == "React"
38+
target.remove_from_project
39+
end
40+
if target.name == 'yoga'
41+
target.remove_from_project
42+
end
43+
end
44+
end

ios/Podfile.lock

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
PODS:
2+
- boost-for-react-native (1.63.0)
3+
- DoubleConversion (1.1.6)
4+
- Folly (2018.10.22.00):
5+
- boost-for-react-native
6+
- DoubleConversion
7+
- glog
8+
- glog (0.3.5)
9+
- React/Core (0.59.10):
10+
- yoga (= 0.59.10.React)
11+
- React/CxxBridge (0.59.10):
12+
- Folly (= 2018.10.22.00)
13+
- React/Core
14+
- React/cxxreact
15+
- React/jsiexecutor
16+
- React/cxxreact (0.59.10):
17+
- boost-for-react-native (= 1.63.0)
18+
- DoubleConversion
19+
- Folly (= 2018.10.22.00)
20+
- glog
21+
- React/jsinspector
22+
- React/DevSupport (0.59.10):
23+
- React/Core
24+
- React/RCTWebSocket
25+
- React/fishhook (0.59.10)
26+
- React/jsi (0.59.10):
27+
- DoubleConversion
28+
- Folly (= 2018.10.22.00)
29+
- glog
30+
- React/jsiexecutor (0.59.10):
31+
- DoubleConversion
32+
- Folly (= 2018.10.22.00)
33+
- glog
34+
- React/cxxreact
35+
- React/jsi
36+
- React/jsinspector (0.59.10)
37+
- React/RCTAnimation (0.59.10):
38+
- React/Core
39+
- React/RCTBlob (0.59.10):
40+
- React/Core
41+
- React/RCTNetwork (0.59.10):
42+
- React/Core
43+
- React/RCTText (0.59.10):
44+
- React/Core
45+
- React/RCTWebSocket (0.59.10):
46+
- React/Core
47+
- React/fishhook
48+
- React/RCTBlob
49+
- yoga (0.59.10.React)
50+
51+
DEPENDENCIES:
52+
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
53+
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
54+
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
55+
- React/Core (from `../node_modules/react-native`)
56+
- React/CxxBridge (from `../node_modules/react-native`)
57+
- React/DevSupport (from `../node_modules/react-native`)
58+
- React/RCTAnimation (from `../node_modules/react-native`)
59+
- React/RCTNetwork (from `../node_modules/react-native`)
60+
- React/RCTText (from `../node_modules/react-native`)
61+
- React/RCTWebSocket (from `../node_modules/react-native`)
62+
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)
63+
64+
SPEC REPOS:
65+
https://github.com/cocoapods/specs.git:
66+
- boost-for-react-native
67+
68+
EXTERNAL SOURCES:
69+
DoubleConversion:
70+
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
71+
Folly:
72+
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
73+
glog:
74+
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
75+
React:
76+
:path: "../node_modules/react-native"
77+
yoga:
78+
:path: "../node_modules/react-native/ReactCommon/yoga"
79+
80+
SPEC CHECKSUMS:
81+
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
82+
DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
83+
Folly: de497beb10f102453a1afa9edbf8cf8a251890de
84+
glog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d
85+
React: 36d0768f9e93be2473b37e7fa64f92c1d5341eef
86+
yoga: 684513b14b03201579ba3cee20218c9d1298b0cc
87+
88+
PODFILE CHECKSUM: e613efa4813ffcfb651040cd931aae002c377483
89+
90+
COCOAPODS: 1.6.1

0 commit comments

Comments
 (0)