Skip to content

Commit 03238b8

Browse files
committed
Update project configuration for Swift 5
1 parent 2dd25ee commit 03238b8

File tree

5 files changed

+46
-61
lines changed

5 files changed

+46
-61
lines changed

Demo/Demo.xcodeproj/project.pbxproj

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
2E44D6A01B4C326300C9C49E /* Sources */,
172172
2E44D6A11B4C326300C9C49E /* Frameworks */,
173173
2E44D6A21B4C326300C9C49E /* Resources */,
174-
51F397721E48A3BB0011B2A1 /* Run Script Lint */,
175174
);
176175
buildRules = (
177176
);
@@ -208,13 +207,13 @@
208207
attributes = {
209208
LastSwiftMigration = 0700;
210209
LastSwiftUpdateCheck = 0700;
211-
LastUpgradeCheck = 1000;
210+
LastUpgradeCheck = 1130;
212211
ORGANIZATIONNAME = "PHAM BA THO";
213212
TargetAttributes = {
214213
2E44D6A31B4C326300C9C49E = {
215214
CreatedOnToolsVersion = 6.4;
216215
DevelopmentTeam = 86P6ENG49D;
217-
LastSwiftMigration = 1000;
216+
LastSwiftMigration = 1130;
218217
};
219218
2E44D6B81B4C326300C9C49E = {
220219
CreatedOnToolsVersion = 6.4;
@@ -228,6 +227,7 @@
228227
developmentRegion = English;
229228
hasScannedForEncodings = 0;
230229
knownRegions = (
230+
English,
231231
en,
232232
Base,
233233
);
@@ -263,23 +263,6 @@
263263
};
264264
/* End PBXResourcesBuildPhase section */
265265

266-
/* Begin PBXShellScriptBuildPhase section */
267-
51F397721E48A3BB0011B2A1 /* Run Script Lint */ = {
268-
isa = PBXShellScriptBuildPhase;
269-
buildActionMask = 2147483647;
270-
files = (
271-
);
272-
inputPaths = (
273-
);
274-
name = "Run Script Lint";
275-
outputPaths = (
276-
);
277-
runOnlyForDeploymentPostprocessing = 0;
278-
shellPath = /bin/sh;
279-
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
280-
};
281-
/* End PBXShellScriptBuildPhase section */
282-
283266
/* Begin PBXSourcesBuildPhase section */
284267
2E44D6A01B4C326300C9C49E /* Sources */ = {
285268
isa = PBXSourcesBuildPhase;
@@ -341,6 +324,7 @@
341324
isa = XCBuildConfiguration;
342325
buildSettings = {
343326
ALWAYS_SEARCH_USER_PATHS = NO;
327+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
344328
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
345329
CLANG_CXX_LIBRARY = "libc++";
346330
CLANG_ENABLE_MODULES = YES;
@@ -384,7 +368,7 @@
384368
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
385369
GCC_WARN_UNUSED_FUNCTION = YES;
386370
GCC_WARN_UNUSED_VARIABLE = YES;
387-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
371+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
388372
MTL_ENABLE_DEBUG_INFO = YES;
389373
ONLY_ACTIVE_ARCH = YES;
390374
SDKROOT = iphoneos;
@@ -396,6 +380,7 @@
396380
isa = XCBuildConfiguration;
397381
buildSettings = {
398382
ALWAYS_SEARCH_USER_PATHS = NO;
383+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
399384
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
400385
CLANG_CXX_LIBRARY = "libc++";
401386
CLANG_ENABLE_MODULES = YES;
@@ -432,7 +417,7 @@
432417
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
433418
GCC_WARN_UNUSED_FUNCTION = YES;
434419
GCC_WARN_UNUSED_VARIABLE = YES;
435-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
420+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
436421
MTL_ENABLE_DEBUG_INFO = NO;
437422
SDKROOT = iphoneos;
438423
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -446,11 +431,11 @@
446431
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
447432
DEVELOPMENT_TEAM = 86P6ENG49D;
448433
INFOPLIST_FILE = "Demo/Supporting Files/Info.plist";
449-
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
434+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
450435
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
451-
PRODUCT_BUNDLE_IDENTIFIER = "phambatho.$(PRODUCT_NAME:rfc1034identifier)";
436+
PRODUCT_BUNDLE_IDENTIFIER = "com.phambatho.$(PRODUCT_NAME:rfc1034identifier)";
452437
PRODUCT_NAME = "$(TARGET_NAME)";
453-
SWIFT_VERSION = 4.2;
438+
SWIFT_VERSION = 5.0;
454439
};
455440
name = Debug;
456441
};
@@ -459,11 +444,11 @@
459444
buildSettings = {
460445
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
461446
INFOPLIST_FILE = "Demo/Supporting Files/Info.plist";
462-
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
447+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
463448
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
464-
PRODUCT_BUNDLE_IDENTIFIER = "phambatho.$(PRODUCT_NAME:rfc1034identifier)";
449+
PRODUCT_BUNDLE_IDENTIFIER = "com.phambatho.$(PRODUCT_NAME:rfc1034identifier)";
465450
PRODUCT_NAME = "$(TARGET_NAME)";
466-
SWIFT_VERSION = 4.2;
451+
SWIFT_VERSION = 5.0;
467452
};
468453
name = Release;
469454
};

Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1130"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -41,6 +41,15 @@
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4343
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<MacroExpansion>
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "2E44D6A31B4C326300C9C49E"
48+
BuildableName = "Demo.app"
49+
BlueprintName = "Demo"
50+
ReferencedContainer = "container:Demo.xcodeproj">
51+
</BuildableReference>
52+
</MacroExpansion>
4453
<Testables>
4554
<TestableReference
4655
skipped = "NO">
@@ -53,17 +62,6 @@
5362
</BuildableReference>
5463
</TestableReference>
5564
</Testables>
56-
<MacroExpansion>
57-
<BuildableReference
58-
BuildableIdentifier = "primary"
59-
BlueprintIdentifier = "2E44D6A31B4C326300C9C49E"
60-
BuildableName = "Demo.app"
61-
BlueprintName = "Demo"
62-
ReferencedContainer = "container:Demo.xcodeproj">
63-
</BuildableReference>
64-
</MacroExpansion>
65-
<AdditionalOptions>
66-
</AdditionalOptions>
6765
</TestAction>
6866
<LaunchAction
6967
buildConfiguration = "Debug"
@@ -85,8 +83,6 @@
8583
ReferencedContainer = "container:Demo.xcodeproj">
8684
</BuildableReference>
8785
</BuildableProductRunnable>
88-
<AdditionalOptions>
89-
</AdditionalOptions>
9086
</LaunchAction>
9187
<ProfileAction
9288
buildConfiguration = "Release"

Demo/Demo/AppDelegate.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1515

1616

1717
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18-
// Set white status bar
19-
UIApplication.shared.setStatusBarStyle(UIStatusBarStyle.lightContent, animated: true)
2018
return true
2119
}
2220

Demo/Demo/Base.lproj/Main.storyboard

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="s8W-fO-vqO">
3-
<device id="retina4_7" orientation="portrait">
4-
<adaptation id="fullscreen"/>
5-
</device>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="s8W-fO-vqO">
3+
<device id="retina4_7" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
9-
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
107
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
118
</dependencies>
129
<scenes>
@@ -54,7 +51,7 @@
5451
<tabBarItem key="tabBarItem" systemItem="featured" id="60w-9J-6f0"/>
5552
<toolbarItems/>
5653
<navigationBar key="navigationBar" contentMode="scaleToFill" id="Yvl-Sk-d0l">
57-
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
54+
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
5855
<autoresizingMask key="autoresizingMask"/>
5956
</navigationBar>
6057
<nil name="viewControllers"/>
@@ -78,18 +75,29 @@
7875
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
7976
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
8077
<subviews>
81-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Have a good day 😉" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kgC-KD-R5q">
82-
<rect key="frame" x="46" y="320" width="283" height="27.5"/>
83-
<fontDescription key="fontDescription" type="system" pointSize="23"/>
84-
<color key="textColor" red="1" green="0.6344769294" blue="0.20655745989999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
78+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Thanks for checking this out! " textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6IJ-Yp-TKo">
79+
<rect key="frame" x="20" y="321" width="335" height="25.5"/>
80+
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="21"/>
81+
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
82+
<nil key="highlightedColor"/>
83+
</label>
84+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="88J-NI-ZI0">
85+
<rect key="frame" x="20" y="354.5" width="335" height="40"/>
86+
<string key="text">Feel free to share or contribute
87+
if you find this library useful.</string>
88+
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
89+
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
8590
<nil key="highlightedColor"/>
8691
</label>
8792
</subviews>
8893
<color key="backgroundColor" red="0.93729967950000004" green="0.93729967950000004" blue="0.93729967950000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
8994
<constraints>
90-
<constraint firstItem="kgC-KD-R5q" firstAttribute="leading" secondItem="nN6-1u-YNS" secondAttribute="leadingMargin" constant="30" id="8Fx-2i-PG8"/>
91-
<constraint firstItem="kgC-KD-R5q" firstAttribute="centerY" secondItem="nN6-1u-YNS" secondAttribute="centerY" id="9MX-hI-TaL"/>
92-
<constraint firstAttribute="trailingMargin" secondItem="kgC-KD-R5q" secondAttribute="trailing" constant="30" id="ypy-aN-iIa"/>
95+
<constraint firstItem="88J-NI-ZI0" firstAttribute="trailing" secondItem="6IJ-Yp-TKo" secondAttribute="trailing" id="JUL-os-kgt"/>
96+
<constraint firstItem="6IJ-Yp-TKo" firstAttribute="leading" secondItem="nN6-1u-YNS" secondAttribute="leading" constant="20" id="TSG-3U-wa0"/>
97+
<constraint firstItem="88J-NI-ZI0" firstAttribute="top" secondItem="6IJ-Yp-TKo" secondAttribute="bottom" constant="8" id="ZLR-RA-LsI"/>
98+
<constraint firstItem="88J-NI-ZI0" firstAttribute="leading" secondItem="6IJ-Yp-TKo" secondAttribute="leading" id="dFc-Pk-QKV"/>
99+
<constraint firstAttribute="trailing" secondItem="6IJ-Yp-TKo" secondAttribute="trailing" constant="20" id="dh7-gL-at7"/>
100+
<constraint firstItem="6IJ-Yp-TKo" firstAttribute="centerY" secondItem="nN6-1u-YNS" secondAttribute="centerY" id="dop-lm-3g6"/>
93101
</constraints>
94102
</view>
95103
<tabBarItem key="tabBarItem" systemItem="more" id="BSz-Fb-oZd"/>

Demo/Demo/Supporting Files/Info.plist

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIdentifier</key>
10-
<string>me.batho.$(PRODUCT_NAME:rfc1034identifier)</string>
10+
<string>com.phambatho.$(PRODUCT_NAME:rfc1034identifier)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>
@@ -34,7 +34,5 @@
3434
<array>
3535
<string>UIInterfaceOrientationPortrait</string>
3636
</array>
37-
<key>UIViewControllerBasedStatusBarAppearance</key>
38-
<false/>
3937
</dict>
4038
</plist>

0 commit comments

Comments
 (0)