Skip to content

Commit 93dc403

Browse files
spdr adminfacebook-github-bot
authored andcommitted
Fix RNTest TVOS target (facebook#25110)
Summary: I noticed that the RNTester-tvOS target is not compilable when I wanted to test the TVOS capacity of React Native. More specifically, the changes included in this PR are: ### RNTester-tvOS target 1. Add `AppDelegate.mm` to the target. 2. Add `.m` files under `turbomodule` to the target. 3. Add the following directories to **header search path**. ``` $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2018.10.22.00 $(SRCROOT)/../third-party/glog-0.3.5/src ``` 4. Add `RN_BUNDLE_PREFIX` to the scheme argument. 5. Add `RN_BUNDLE_PREFIX` entry to the plist file. ### React-tvOS target 1. Add `RCTCxxBridgeDelegate.h` and `JSCExecutorFactory.h` to the **Copy headers**. ## Changelog [iOS] [Fixed] - Fixed the issue that the RNTester-tvOS is not compilable. Pull Request resolved: facebook#25110 Differential Revision: D15602450 Pulled By: cpojer fbshipit-source-id: e7eda18c8193b7d88355feafa69043ffef4a8edb
1 parent ebb8caa commit 93dc403

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

RNTester/RNTester-tvOS/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@
3131
</array>
3232
<key>UIUserInterfaceStyle</key>
3333
<string>Automatic</string>
34+
<key>RN_BUNDLE_PREFIX</key>
35+
<string>$(RN_BUNDLE_PREFIX)</string>
3436
</dict>
3537
</plist>

RNTester/RNTester.xcodeproj/project.pbxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@
111111
3D56F9F11D6F6E9B00F53A06 /* RNTesterBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3D13F83E1D6F6AE000E69E0E /* RNTesterBundle.bundle */; };
112112
3DB99D0C1BA0340600302749 /* RNTesterIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB99D0B1BA0340600302749 /* RNTesterIntegrationTests.m */; };
113113
3DD981D61D33C6FB007DC7BE /* RNTesterUnitTestsBundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DD981D51D33C6FB007DC7BE /* RNTesterUnitTestsBundle.js */; };
114+
3FCC247D22A2333F0013B22F /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C60EB582264416A0018C04F /* AppDelegate.mm */; };
115+
3FCC24AA22A25DF80013B22F /* RCTNativeSampleTurboModuleSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C2B71152267DB1A0066069E /* RCTNativeSampleTurboModuleSpec.mm */; };
116+
3FCC24AB22A25DFF0013B22F /* RCTSampleTurboModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C2B711A2267DB1A0066069E /* RCTSampleTurboModule.mm */; };
114117
52C11BBB1EEACA7100C1A058 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5281CA511EEAC9A700AC40CD /* libRCTBlob.a */; };
115118
52C11BE11EEACA7800C1A058 /* libRCTBlob-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5281CA531EEAC9A700AC40CD /* libRCTBlob-tvOS.a */; };
116119
5C2B71672267DB1A0066069E /* RCTNativeSampleTurboModuleSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C2B71152267DB1A0066069E /* RCTNativeSampleTurboModuleSpec.mm */; };
@@ -1772,8 +1775,11 @@
17721775
isa = PBXSourcesBuildPhase;
17731776
buildActionMask = 2147483647;
17741777
files = (
1778+
3FCC24AB22A25DFF0013B22F /* RCTSampleTurboModule.mm in Sources */,
17751779
2DD323DC1DA2DDBF000FE1B8 /* FlexibleSizeExampleView.m in Sources */,
17761780
2DD323DD1DA2DDBF000FE1B8 /* UpdatePropertiesExampleView.m in Sources */,
1781+
3FCC247D22A2333F0013B22F /* AppDelegate.mm in Sources */,
1782+
3FCC24AA22A25DF80013B22F /* RCTNativeSampleTurboModuleSpec.mm in Sources */,
17771783
2DD323E01DA2DDBF000FE1B8 /* main.m in Sources */,
17781784
);
17791785
runOnlyForDeploymentPostprocessing = 0;
@@ -2025,6 +2031,11 @@
20252031
CLANG_WARN_SUSPICIOUS_MOVES = YES;
20262032
DEBUG_INFORMATION_FORMAT = dwarf;
20272033
GCC_NO_COMMON_BLOCKS = YES;
2034+
HEADER_SEARCH_PATHS = (
2035+
"$(SRCROOT)/../third-party/boost_1_63_0",
2036+
"$(SRCROOT)/../third-party/folly-2018.10.22.00",
2037+
"$(SRCROOT)/../third-party/glog-0.3.5/src",
2038+
);
20282039
INFOPLIST_FILE = "RNTester-tvOS/Info.plist";
20292040
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
20302041
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.RNTester-tvOS";
@@ -2045,6 +2056,11 @@
20452056
COPY_PHASE_STRIP = NO;
20462057
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
20472058
GCC_NO_COMMON_BLOCKS = YES;
2059+
HEADER_SEARCH_PATHS = (
2060+
"$(SRCROOT)/../third-party/boost_1_63_0",
2061+
"$(SRCROOT)/../third-party/folly-2018.10.22.00",
2062+
"$(SRCROOT)/../third-party/glog-0.3.5/src",
2063+
);
20482064
INFOPLIST_FILE = "RNTester-tvOS/Info.plist";
20492065
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
20502066
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.RNTester-tvOS";

RNTester/RNTester.xcodeproj/xcshareddata/xcschemes/RNTester-tvOS.xcscheme

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@
101101
value = "1"
102102
isEnabled = "YES">
103103
</EnvironmentVariable>
104+
<EnvironmentVariable
105+
key = "RN_BUNDLE_PREFIX"
106+
isEnabled = "YES">
107+
</EnvironmentVariable>
104108
</EnvironmentVariables>
105109
<AdditionalOptions>
106110
</AdditionalOptions>

React/React.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,8 @@
793793
3DFE0D1B1DF8575800459392 /* YGMacros.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 130A77041DF767AF001F9587 /* YGMacros.h */; };
794794
3DFE0D1C1DF8575800459392 /* Yoga.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 130A77081DF767AF001F9587 /* Yoga.h */; };
795795
3EDCA8A51D3591E700450C31 /* RCTErrorInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EDCA8A41D3591E700450C31 /* RCTErrorInfo.m */; };
796+
3FCC24A822A24FCC0013B22F /* JSCExecutorFactory.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 8507BBBD21EDACC200AEAFCA /* JSCExecutorFactory.h */; };
797+
3FCC24A922A24FD90013B22F /* RCTCxxBridgeDelegate.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 134D63C21F1FEC4B008872B5 /* RCTCxxBridgeDelegate.h */; };
796798
4F56C93822167A4800DB9F3F /* jsi/jsilib.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F56C93722167A4800DB9F3F /* jsi/jsilib.h */; };
797799
4F56C93922167A4D00DB9F3F /* jsi/jsilib.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 4F56C93722167A4800DB9F3F /* jsi/jsilib.h */; };
798800
4F56C93A2216A3B700DB9F3F /* jsi/jsilib.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 4F56C93722167A4800DB9F3F /* jsi/jsilib.h */; };
@@ -1344,6 +1346,8 @@
13441346
dstPath = include/React;
13451347
dstSubfolderSpec = 16;
13461348
files = (
1349+
3FCC24A922A24FD90013B22F /* RCTCxxBridgeDelegate.h in Copy Headers */,
1350+
3FCC24A822A24FCC0013B22F /* JSCExecutorFactory.h in Copy Headers */,
13471351
0EA924D02237686F004AB895 /* RCTSurfacePresenterStub.h in Copy Headers */,
13481352
591F78DF202ADB97004A668C /* RCTLayout.h in Copy Headers */,
13491353
59EDBCC31FDF4E55003573DE /* RCTScrollableProtocol.h in Copy Headers */,

0 commit comments

Comments
 (0)