Skip to content

Commit 6685aba

Browse files
janicduplessisfacebook-github-bot
authored andcommitted
Update template to xcode 12 (#30150)
Summary: This makes a few change to the template xcodeproj - Update to recommended settings for Xcode 12 - Remove the main.jsbundle file that doesn't exists, this file is included automatically in the app bundle and doesn't need to be in xcode (it won't even be at that path). - Add -e to the bundle images script. It seems like Xcode doesn't fail the build on script errors anymore so this makes it so the build stop. If it doesn't stop the app will launch and crash because the bundle doesn't exist (note this is only if running the app in release mode since in debug we don't generate the bundle). ## Changelog [iOS] [Added] - Update template to xcode 12 Pull Request resolved: #30150 Test Plan: Made the same changes in an app and made sure it ran well. Reviewed By: cpojer Differential Revision: D24237481 Pulled By: sammy-SC fbshipit-source-id: 2b06a24c510c423eb45a1a840ea365b64506321b
1 parent d8b0e9d commit 6685aba

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
E7DB215F22B2F3EC005AC45F /* RCTUIManagerScenarioTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTUIManagerScenarioTests.m; sourceTree = "<group>"; };
165165
E7DB216022B2F3EC005AC45F /* RNTesterSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNTesterSnapshotTests.m; sourceTree = "<group>"; };
166166
E7DB216122B2F3EC005AC45F /* RCTRootViewIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRootViewIntegrationTests.m; sourceTree = "<group>"; };
167-
E7DB218B22B41FCD005AC45F /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = XCTest.framework; sourceTree = DEVELOPER_DIR; };
167+
E7DB218B22B41FCD005AC45F /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = XCTest.framework; sourceTree = DEVELOPER_DIR; };
168168
E9618482EC8608D4872A6E28 /* Pods-RNTesterUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.release.xcconfig"; sourceTree = "<group>"; };
169169
/* End PBXFileReference section */
170170

@@ -586,7 +586,7 @@
586586
);
587587
runOnlyForDeploymentPostprocessing = 0;
588588
shellPath = /bin/sh;
589-
shellScript = "export NODE_BINARY=node\nexport PROJECT_ROOT=$SRCROOT/..\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n";
589+
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport PROJECT_ROOT=$SRCROOT/..\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n";
590590
};
591591
C1C7A9D58CE1D09515F20577 /* [CP] Copy Pods Resources */ = {
592592
isa = PBXShellScriptBuildPhase;

template/ios/HelloWorld.xcodeproj/project.pbxproj

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
/* End PBXContainerItemProxy section */
2626

2727
/* Begin PBXFileReference section */
28-
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
2928
00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloWorldTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3029
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3130
00E356F21AD99517003FC87E /* HelloWorldTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HelloWorldTests.m; sourceTree = "<group>"; };
@@ -77,7 +76,6 @@
7776
13B07FAE1A68108700A75B9A /* HelloWorld */ = {
7877
isa = PBXGroup;
7978
children = (
80-
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
8179
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
8280
13B07FB01A68108700A75B9A /* AppDelegate.m */,
8381
13B07FB51A68108700A75B9A /* Images.xcassets */,
@@ -92,7 +90,6 @@
9290
isa = PBXGroup;
9391
children = (
9492
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
95-
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
9693
);
9794
name = Frameworks;
9895
sourceTree = "<group>";
@@ -173,7 +170,7 @@
173170
83CBB9F71A601CBA00E9B192 /* Project object */ = {
174171
isa = PBXProject;
175172
attributes = {
176-
LastUpgradeCheck = 1130;
173+
LastUpgradeCheck = 1200;
177174
TargetAttributes = {
178175
00E356ED1AD99517003FC87E = {
179176
CreatedOnToolsVersion = 6.2;
@@ -235,7 +232,7 @@
235232
);
236233
runOnlyForDeploymentPostprocessing = 0;
237234
shellPath = /bin/sh;
238-
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
235+
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
239236
};
240237
FD10A7F022414F080027D42C /* Start Packager */ = {
241238
isa = PBXShellScriptBuildPhase;
@@ -393,6 +390,7 @@
393390
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
394391
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
395392
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
393+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
396394
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
397395
CLANG_WARN_STRICT_PROTOTYPES = YES;
398396
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -453,6 +451,7 @@
453451
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
454452
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
455453
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
454+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
456455
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
457456
CLANG_WARN_STRICT_PROTOTYPES = YES;
458457
CLANG_WARN_SUSPICIOUS_MOVE = YES;

template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1130"
3+
LastUpgradeVersion = "1200"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
 (0)