Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Commit b1c584f

Browse files
committed
🔧 (react-native-animated) link native module
1 parent d2ebcc3 commit b1c584f

4 files changed

Lines changed: 78 additions & 2 deletions

File tree

example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
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

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

Lines changed: 3 additions & 1 deletion
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

example/android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
rootProject.name = 'example'
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'

example/ios/example.xcodeproj/project.pbxproj

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2424
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
2525
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
26+
DB5511A2A9424727A2617A7B /* libRNReanimated.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FE24D3CAC2C2425684F4ECD8 /* libRNReanimated.a */; };
2627
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
2728
/* End PBXBuildFile section */
2829

@@ -258,6 +259,20 @@
258259
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
259260
remoteInfo = RCTBlob;
260261
};
262+
E826771E22CBC027002425C6 /* PBXContainerItemProxy */ = {
263+
isa = PBXContainerItemProxy;
264+
containerPortal = 1CF1B18006DF41C796CC5DD7 /* RNReanimated.xcodeproj */;
265+
proxyType = 2;
266+
remoteGlobalIDString = 134814201AA4EA6300B7C361;
267+
remoteInfo = RNReanimated;
268+
};
269+
E826772022CBC027002425C6 /* PBXContainerItemProxy */ = {
270+
isa = PBXContainerItemProxy;
271+
containerPortal = 1CF1B18006DF41C796CC5DD7 /* RNReanimated.xcodeproj */;
272+
proxyType = 2;
273+
remoteGlobalIDString = FDBB176E229BF04900D1E455;
274+
remoteInfo = "RNReanimated-tvOS";
275+
};
261276
E850BE6F22554A1900782404 /* PBXContainerItemProxy */ = {
262277
isa = PBXContainerItemProxy;
263278
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
@@ -307,13 +322,15 @@
307322
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = "<group>"; };
308323
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = "<group>"; };
309324
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
325+
1CF1B18006DF41C796CC5DD7 /* RNReanimated.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNReanimated.xcodeproj; path = "../node_modules/react-native-reanimated/ios/RNReanimated.xcodeproj"; sourceTree = "<group>"; };
310326
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
311327
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
312328
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
313329
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
314330
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
315331
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
316332
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
333+
FE24D3CAC2C2425684F4ECD8 /* libRNReanimated.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNReanimated.a; sourceTree = "<group>"; };
317334
/* End PBXFileReference section */
318335

319336
/* Begin PBXFrameworksBuildPhase section */
@@ -334,6 +351,7 @@
334351
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
335352
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
336353
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
354+
DB5511A2A9424727A2617A7B /* libRNReanimated.a in Frameworks */,
337355
);
338356
runOnlyForDeploymentPostprocessing = 0;
339357
};
@@ -499,6 +517,7 @@
499517
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
500518
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
501519
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
520+
1CF1B18006DF41C796CC5DD7 /* RNReanimated.xcodeproj */,
502521
);
503522
name = Libraries;
504523
sourceTree = "<group>";
@@ -520,6 +539,7 @@
520539
00E356EF1AD99517003FC87E /* exampleTests */,
521540
83CBBA001A601CBA00E9B192 /* Products */,
522541
2D16E6871FA4F8E400B85C8A /* Frameworks */,
542+
E82676F422CBC024002425C6 /* Recovered References */,
523543
);
524544
indentWidth = 2;
525545
sourceTree = "<group>";
@@ -543,6 +563,23 @@
543563
name = Products;
544564
sourceTree = "<group>";
545565
};
566+
E82676F422CBC024002425C6 /* Recovered References */ = {
567+
isa = PBXGroup;
568+
children = (
569+
FE24D3CAC2C2425684F4ECD8 /* libRNReanimated.a */,
570+
);
571+
name = "Recovered References";
572+
sourceTree = "<group>";
573+
};
574+
E826771A22CBC027002425C6 /* Products */ = {
575+
isa = PBXGroup;
576+
children = (
577+
E826771F22CBC027002425C6 /* libRNReanimated.a */,
578+
E826772122CBC027002425C6 /* libRNReanimated-tvOS.a */,
579+
);
580+
name = Products;
581+
sourceTree = "<group>";
582+
};
546583
/* End PBXGroup section */
547584

548585
/* Begin PBXNativeTarget section */
@@ -570,7 +607,7 @@
570607
83CBB9F71A601CBA00E9B192 /* Project object */ = {
571608
isa = PBXProject;
572609
attributes = {
573-
LastUpgradeCheck = 0940;
610+
LastUpgradeCheck = 940;
574611
ORGANIZATIONNAME = Facebook;
575612
};
576613
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */;
@@ -634,6 +671,10 @@
634671
ProductGroup = 146834001AC3E56700842450 /* Products */;
635672
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
636673
},
674+
{
675+
ProductGroup = E826771A22CBC027002425C6 /* Products */;
676+
ProjectRef = 1CF1B18006DF41C796CC5DD7 /* RNReanimated.xcodeproj */;
677+
},
637678
);
638679
projectRoot = "";
639680
targets = (
@@ -874,6 +915,20 @@
874915
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
875916
sourceTree = BUILT_PRODUCTS_DIR;
876917
};
918+
E826771F22CBC027002425C6 /* libRNReanimated.a */ = {
919+
isa = PBXReferenceProxy;
920+
fileType = archive.ar;
921+
path = libRNReanimated.a;
922+
remoteRef = E826771E22CBC027002425C6 /* PBXContainerItemProxy */;
923+
sourceTree = BUILT_PRODUCTS_DIR;
924+
};
925+
E826772122CBC027002425C6 /* libRNReanimated-tvOS.a */ = {
926+
isa = PBXReferenceProxy;
927+
fileType = archive.ar;
928+
path = "libRNReanimated-tvOS.a";
929+
remoteRef = E826772022CBC027002425C6 /* PBXContainerItemProxy */;
930+
sourceTree = BUILT_PRODUCTS_DIR;
931+
};
877932
E850BE7022554A1900782404 /* libjsi.a */ = {
878933
isa = PBXReferenceProxy;
879934
fileType = archive.ar;
@@ -964,8 +1019,16 @@
9641019
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
9651020
CURRENT_PROJECT_VERSION = 1;
9661021
DEAD_CODE_STRIPPING = NO;
1022+
HEADER_SEARCH_PATHS = (
1023+
"$(inherited)",
1024+
"$(SRCROOT)/../node_modules/react-native-reanimated/ios/**",
1025+
);
9671026
INFOPLIST_FILE = example/Info.plist;
9681027
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1028+
LIBRARY_SEARCH_PATHS = (
1029+
"$(inherited)",
1030+
"\"$(SRCROOT)/example\"",
1031+
);
9691032
OTHER_LDFLAGS = (
9701033
"$(inherited)",
9711034
"-ObjC",
@@ -982,8 +1045,16 @@
9821045
buildSettings = {
9831046
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
9841047
CURRENT_PROJECT_VERSION = 1;
1048+
HEADER_SEARCH_PATHS = (
1049+
"$(inherited)",
1050+
"$(SRCROOT)/../node_modules/react-native-reanimated/ios/**",
1051+
);
9851052
INFOPLIST_FILE = example/Info.plist;
9861053
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1054+
LIBRARY_SEARCH_PATHS = (
1055+
"$(inherited)",
1056+
"\"$(SRCROOT)/example\"",
1057+
);
9871058
OTHER_LDFLAGS = (
9881059
"$(inherited)",
9891060
"-ObjC",

0 commit comments

Comments
 (0)