Skip to content

Commit 805e4fe

Browse files
tyrone-sudeiumgrabbou
authored andcommitted
Fix duplicate symbols linker error in xcodeproj (facebook#23284)
Summary: When using building React Native using the `.xcodeproj` (either via linked projects in Xcode, or precompiling React Native, which is what we do), you'll get a duplicate symbol error: ``` duplicate symbol __ZN8facebook5react10IInspectorD0Ev ... ``` And a few more. This is because the `InspectorInterfaces.cpp` file is included in _both_ the `React` target _and_ the `jsinspector` target, and since the `jsinspector` target gets linked into the `React` target, this means the symbols from `InspectorInterfaces.cpp` end up in `libReact.a` twice. <img width="187" alt="screen shot 2019-02-04 at 11 43 39 am" src="https://user-images.githubusercontent.com/819705/52189088-93190880-288a-11e9-8411-b44b59e8e461.png"> This PR removes `InspectorInterfaces.cpp` from the `React` target, as I believe was the original intent. Since this bug is in the `xcodeproj` it only affects builds that use that, so CocoaPods and Buck users are unaffected. [iOS][Fixed] - Fix potential linker issues when using xcode project Pull Request resolved: facebook#23284 Differential Revision: D13941777 Pulled By: cpojer fbshipit-source-id: 8a3ffb4fc916ff6570bbff8794b4515b48055667
1 parent 519ad8c commit 805e4fe

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

React/React.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,13 +1098,11 @@
10981098
E223624420875A8000108244 /* JSExecutor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E223624320875A8000108244 /* JSExecutor.cpp */; };
10991099
E9B20B7B1B500126007A2DA7 /* RCTAccessibilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E9B20B7A1B500126007A2DA7 /* RCTAccessibilityManager.m */; };
11001100
EBF21BBC1FC498270052F4D5 /* InspectorInterfaces.h in Headers */ = {isa = PBXBuildFile; fileRef = EBF21BBA1FC498270052F4D5 /* InspectorInterfaces.h */; };
1101-
EBF21BBD1FC498270052F4D5 /* InspectorInterfaces.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBF21BBB1FC498270052F4D5 /* InspectorInterfaces.cpp */; };
11021101
EBF21BBE1FC498630052F4D5 /* InspectorInterfaces.h in Headers */ = {isa = PBXBuildFile; fileRef = EBF21BBA1FC498270052F4D5 /* InspectorInterfaces.h */; };
11031102
EBF21BFB1FC498FC0052F4D5 /* InspectorInterfaces.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = EBF21BBA1FC498270052F4D5 /* InspectorInterfaces.h */; };
11041103
EBF21BFC1FC4990B0052F4D5 /* InspectorInterfaces.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBF21BBB1FC498270052F4D5 /* InspectorInterfaces.cpp */; };
11051104
EBF21BFE1FC499840052F4D5 /* InspectorInterfaces.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = EBF21BBA1FC498270052F4D5 /* InspectorInterfaces.h */; };
11061105
EBF21BFF1FC4998E0052F4D5 /* InspectorInterfaces.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBF21BBB1FC498270052F4D5 /* InspectorInterfaces.cpp */; };
1107-
EBF21C001FC499A80052F4D5 /* InspectorInterfaces.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EBF21BBB1FC498270052F4D5 /* InspectorInterfaces.cpp */; };
11081106
ED296F82214C973700B7C4FE /* libjsinspector-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EBF21BFA1FC4989A0052F4D5 /* libjsinspector-tvOS.a */; };
11091107
ED296F83214C974A00B7C4FE /* libyoga.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D3C06751DE3340C00C268FA /* libyoga.a */; };
11101108
ED296FB7214C9A9A00B7C4FE /* JSIDynamic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EDEBC6DA214B3F6800DD5AC8 /* JSIDynamic.cpp */; };
@@ -4229,7 +4227,6 @@
42294227
13134C871E296B2A00B9F3CB /* RCTCxxBridge.mm in Sources */,
42304228
CF2731C31E7B8DF30044CA4F /* RCTDeviceInfo.m in Sources */,
42314229
599FAA3F1FB274980058CCF6 /* RCTSurfaceRootShadowView.m in Sources */,
4232-
EBF21C001FC499A80052F4D5 /* InspectorInterfaces.cpp in Sources */,
42334230
597633371F4E021D005BE8A4 /* RCTShadowView+Internal.m in Sources */,
42344231
2D3B5EB11D9B090100451313 /* RCTAppState.m in Sources */,
42354232
59E604A31FE9CCE300BD90C5 /* RCTScrollContentViewManager.m in Sources */,
@@ -4504,7 +4501,6 @@
45044501
59D031F71F8353D3008361F0 /* RCTSafeAreaViewLocalData.m in Sources */,
45054502
13E067571A70F44B002CDEE1 /* RCTView.m in Sources */,
45064503
3D7749441DC1065C007EC8D8 /* RCTPlatform.m in Sources */,
4507-
EBF21BBD1FC498270052F4D5 /* InspectorInterfaces.cpp in Sources */,
45084504
59EDBCAF1FDF4E0C003573DE /* RCTScrollContentView.m in Sources */,
45094505
13D9FEEE1CDCD93000158BD7 /* RCTKeyboardObserver.m in Sources */,
45104506
B233E6EA1D2D845D00BC68BA /* RCTI18nManager.m in Sources */,

0 commit comments

Comments
 (0)