Skip to content

Commit fc91340

Browse files
committed
Minimum deployment target is iOS 13
Xcode recommended settings
1 parent 68f6073 commit fc91340

File tree

8 files changed

+69
-51
lines changed

8 files changed

+69
-51
lines changed

Diff for: solutions/adaptability/ch14-1-v1/ch14-1-v1.xcodeproj/project.pbxproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -90,8 +90,9 @@
9090
53BB4B5B213D9072000661D6 /* Project object */ = {
9191
isa = PBXProject;
9292
attributes = {
93+
BuildIndependentTargetsInParallel = YES;
9394
LastSwiftUpdateCheck = 1000;
94-
LastUpgradeCheck = 1210;
95+
LastUpgradeCheck = 1500;
9596
ORGANIZATIONNAME = "Keith Harrison";
9697
TargetAttributes = {
9798
53BB4B62213D9072000661D6 = {
@@ -201,6 +202,7 @@
201202
DEBUG_INFORMATION_FORMAT = dwarf;
202203
ENABLE_STRICT_OBJC_MSGSEND = YES;
203204
ENABLE_TESTABILITY = YES;
205+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
204206
GCC_C_LANGUAGE_STANDARD = gnu11;
205207
GCC_DYNAMIC_NO_PIC = NO;
206208
GCC_NO_COMMON_BLOCKS = YES;
@@ -215,7 +217,7 @@
215217
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
216218
GCC_WARN_UNUSED_FUNCTION = YES;
217219
GCC_WARN_UNUSED_VARIABLE = YES;
218-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
220+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
219221
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
220222
MTL_FAST_MATH = YES;
221223
ONLY_ACTIVE_ARCH = YES;
@@ -263,6 +265,7 @@
263265
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
264266
ENABLE_NS_ASSERTIONS = NO;
265267
ENABLE_STRICT_OBJC_MSGSEND = YES;
268+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
266269
GCC_C_LANGUAGE_STANDARD = gnu11;
267270
GCC_NO_COMMON_BLOCKS = YES;
268271
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -271,7 +274,7 @@
271274
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
272275
GCC_WARN_UNUSED_FUNCTION = YES;
273276
GCC_WARN_UNUSED_VARIABLE = YES;
274-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
277+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
275278
MTL_ENABLE_DEBUG_INFO = NO;
276279
MTL_FAST_MATH = YES;
277280
SDKROOT = iphoneos;

Diff for: solutions/adaptability/ch14-1-v1/ch14-1-v1/Base.lproj/Main.storyboard

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Vf0-9s-7Y9">
3-
<device id="retina6_1" orientation="portrait" appearance="light"/>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Vf0-9s-7Y9">
3+
<device id="retina6_72" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
8+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
89
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
910
</dependencies>
1011
<scenes>
@@ -13,22 +14,22 @@
1314
<objects>
1415
<viewController id="Vf0-9s-7Y9" customClass="ViewController" customModule="ch14_1_v1" customModuleProvider="target" sceneMemberID="viewController">
1516
<view key="view" contentMode="scaleToFill" id="7bd-fc-EpV">
16-
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
17+
<rect key="frame" x="0.0" y="0.0" width="430" height="932"/>
1718
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1819
<subviews>
1920
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="32" translatesAutoresizingMaskIntoConstraints="NO" id="z9M-pr-Ef9">
20-
<rect key="frame" x="20" y="377" width="374" height="152"/>
21+
<rect key="frame" x="20" y="402.66666666666669" width="390" height="152.00000000000006"/>
2122
<subviews>
2223
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zoc-TN-pyt">
23-
<rect key="frame" x="0.0" y="0.0" width="374" height="60"/>
24+
<rect key="frame" x="0.0" y="0.0" width="390" height="60"/>
2425
<color key="backgroundColor" red="0.99942404029999998" green="0.98555368190000003" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2526
<fontDescription key="fontDescription" type="system" pointSize="40"/>
2627
<state key="normal" title="Preview">
2728
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2829
</state>
2930
</button>
3031
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="D3g-lj-bT2">
31-
<rect key="frame" x="0.0" y="92" width="374" height="60"/>
32+
<rect key="frame" x="0.0" y="92" width="390" height="60"/>
3233
<color key="backgroundColor" red="0.0" green="0.97680455450000003" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
3334
<fontDescription key="fontDescription" type="system" pointSize="40"/>
3435
<state key="normal" title="Buy">
@@ -40,7 +41,7 @@
4041
</stackView>
4142
</subviews>
4243
<viewLayoutGuide key="safeArea" id="n78-NZ-YLR"/>
43-
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
44+
<color key="backgroundColor" systemColor="systemGray3Color"/>
4445
<constraints>
4546
<constraint firstItem="z9M-pr-Ef9" firstAttribute="centerY" secondItem="7bd-fc-EpV" secondAttribute="centerYWithinMargins" id="7rd-WN-Ba9"/>
4647
<constraint firstAttribute="trailingMargin" secondItem="z9M-pr-Ef9" secondAttribute="trailing" id="ifV-a4-hcZ"/>
@@ -53,4 +54,9 @@
5354
<point key="canvasLocation" x="136.80000000000001" y="133.5832083958021"/>
5455
</scene>
5556
</scenes>
57+
<resources>
58+
<systemColor name="systemGray3Color">
59+
<color red="0.78039215689999997" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
60+
</systemColor>
61+
</resources>
5662
</document>

Diff for: solutions/adaptability/ch14-1-v2/ch14-1-v2.xcodeproj/project.pbxproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -87,8 +87,9 @@
8787
53BB4B79213D9220000661D6 /* Project object */ = {
8888
isa = PBXProject;
8989
attributes = {
90+
BuildIndependentTargetsInParallel = YES;
9091
LastSwiftUpdateCheck = 1000;
91-
LastUpgradeCheck = 1210;
92+
LastUpgradeCheck = 1500;
9293
ORGANIZATIONNAME = "Keith Harrison";
9394
TargetAttributes = {
9495
53BB4B80213D9220000661D6 = {
@@ -189,6 +190,7 @@
189190
DEBUG_INFORMATION_FORMAT = dwarf;
190191
ENABLE_STRICT_OBJC_MSGSEND = YES;
191192
ENABLE_TESTABILITY = YES;
193+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
192194
GCC_C_LANGUAGE_STANDARD = gnu11;
193195
GCC_DYNAMIC_NO_PIC = NO;
194196
GCC_NO_COMMON_BLOCKS = YES;
@@ -203,7 +205,7 @@
203205
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
204206
GCC_WARN_UNUSED_FUNCTION = YES;
205207
GCC_WARN_UNUSED_VARIABLE = YES;
206-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
208+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
207209
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
208210
MTL_FAST_MATH = YES;
209211
ONLY_ACTIVE_ARCH = YES;
@@ -251,6 +253,7 @@
251253
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
252254
ENABLE_NS_ASSERTIONS = NO;
253255
ENABLE_STRICT_OBJC_MSGSEND = YES;
256+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
254257
GCC_C_LANGUAGE_STANDARD = gnu11;
255258
GCC_NO_COMMON_BLOCKS = YES;
256259
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -259,7 +262,7 @@
259262
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
260263
GCC_WARN_UNUSED_FUNCTION = YES;
261264
GCC_WARN_UNUSED_VARIABLE = YES;
262-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
265+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
263266
MTL_ENABLE_DEBUG_INFO = NO;
264267
MTL_FAST_MATH = YES;
265268
SDKROOT = iphoneos;

Diff for: solutions/adaptability/ch14-1-v2/ch14-1-v2/ViewController.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ final class ViewController: UIViewController {
3434
static let fontSize: CGFloat = 40.0
3535
}
3636

37-
private let previewButton: UIButton = {
37+
private lazy var previewButton: UIButton = {
3838
let title = NSLocalizedString("Preview", comment: "Preview button title")
3939
let button = UIButton.customButton(title: title, color: .yellow, fontSize: ViewMetrics.fontSize)
4040
button.addTarget(self, action: #selector(previewAction(_:)), for: .touchUpInside)
4141
return button
4242
}()
4343

44-
private let buyButton: UIButton = {
44+
private lazy var buyButton: UIButton = {
4545
let title = NSLocalizedString("Buy", comment: "Buy button title")
4646
let button = UIButton.customButton(title: title, color: .green, fontSize: ViewMetrics.fontSize)
4747
button.addTarget(self, action: #selector(buyAction(_:)), for: .touchUpInside)
@@ -62,7 +62,7 @@ final class ViewController: UIViewController {
6262
}
6363

6464
private func setupView() {
65-
view.backgroundColor = .lightGray
65+
view.backgroundColor = .systemGray3
6666
view.addSubview(stackView)
6767
let margin = view.layoutMarginsGuide
6868
NSLayoutConstraint.activate([

Diff for: solutions/adaptability/ch14-2-v1/ch14-2-v1.xcodeproj/project.pbxproj

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -96,8 +96,9 @@
9696
53BB4B94213D92FC000661D6 /* Project object */ = {
9797
isa = PBXProject;
9898
attributes = {
99+
BuildIndependentTargetsInParallel = YES;
99100
LastSwiftUpdateCheck = 1000;
100-
LastUpgradeCheck = 1310;
101+
LastUpgradeCheck = 1500;
101102
ORGANIZATIONNAME = "Keith Harrison";
102103
TargetAttributes = {
103104
53BB4B9B213D92FC000661D6 = {
@@ -209,6 +210,7 @@
209210
DEBUG_INFORMATION_FORMAT = dwarf;
210211
ENABLE_STRICT_OBJC_MSGSEND = YES;
211212
ENABLE_TESTABILITY = YES;
213+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
212214
GCC_C_LANGUAGE_STANDARD = gnu11;
213215
GCC_DYNAMIC_NO_PIC = NO;
214216
GCC_NO_COMMON_BLOCKS = YES;
@@ -223,7 +225,7 @@
223225
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
224226
GCC_WARN_UNUSED_FUNCTION = YES;
225227
GCC_WARN_UNUSED_VARIABLE = YES;
226-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
228+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
227229
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
228230
MTL_FAST_MATH = YES;
229231
ONLY_ACTIVE_ARCH = YES;
@@ -271,6 +273,7 @@
271273
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
272274
ENABLE_NS_ASSERTIONS = NO;
273275
ENABLE_STRICT_OBJC_MSGSEND = YES;
276+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
274277
GCC_C_LANGUAGE_STANDARD = gnu11;
275278
GCC_NO_COMMON_BLOCKS = YES;
276279
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -279,7 +282,7 @@
279282
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
280283
GCC_WARN_UNUSED_FUNCTION = YES;
281284
GCC_WARN_UNUSED_VARIABLE = YES;
282-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
285+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
283286
MTL_ENABLE_DEBUG_INFO = NO;
284287
MTL_FAST_MATH = YES;
285288
SDKROOT = iphoneos;

0 commit comments

Comments
 (0)