Skip to content

Commit bc9dd09

Browse files
authored
Update to Swift 5 (#24)
1 parent 0ae38e9 commit bc9dd09

File tree

6 files changed

+21
-31
lines changed

6 files changed

+21
-31
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0
1+
5.0

.travis.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
osx_image: xcode9.2
1+
osx_image: xcode10.2
22
language: objective-c
33
xcode_project: RandomUserSwift.xcodeproj
44

@@ -11,19 +11,9 @@ before_install:
1111
- gem install xcpretty-json-formatter
1212
- git clone https://github.com/dingwilson/devops-ci.git
1313

14-
env:
15-
matrix:
16-
- UDID="7A5E86EB-E32C-475F-8FF5-10AA330C1D34", IOS_DEVICE="iPhone 7 Plus (11.1)"
17-
- UDID="80BE80F4-C243-43F0-BD95-5CB085DAD04F", IOS_DEVICE="iPhone 6 (8.1)"
18-
1914
script:
2015
- set -o pipefail
21-
- open -a "simulator" --args -CurrentDeviceUDID $UDID
22-
- xcodebuild clean test -project RandomUserSwift.xcodeproj -scheme RandomUserSwift -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,id=$UDID" CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -enableCodeCoverage yes | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild.json" xcpretty -f `xcpretty-json-formatter`
16+
- xcodebuild clean test -project RandomUserSwift.xcodeproj -scheme RandomUserSwift -configuration Debug -destination 'platform=iOS Simulator,name=iPhone XS,OS=latest' CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -enableCodeCoverage yes | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild.json" xcpretty -f `xcpretty-json-formatter`
2317
- bash <(curl -s https://codecov.io/bash)
2418
- bundle exec danger --fail-on-errors=true
25-
26-
jobs:
27-
include:
28-
- stage: jazzy
29-
script: source ./devops-ci/gen_jazzy_docs.sh
19+
- source ./devops-ci/gen_jazzy_docs.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![CocoaPods Version Status](https://img.shields.io/cocoapods/v/RandomUserSwift.svg)](https://cocoapods.org/pods/RandomUserSwift)
99
[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
1010
![Platform](https://img.shields.io/badge/platforms-iOS-333333.svg)
11-
[![Swift](https://img.shields.io/badge/Swift-4.0+-orange.svg)](https://swift.org)
11+
[![Swift](https://img.shields.io/badge/Swift-5.0+-orange.svg)](https://swift.org)
1212
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
1313

1414
<p align="center">

RandomUserSwift.xcodeproj/project.pbxproj

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,29 @@
150150
isa = PBXProject;
151151
attributes = {
152152
LastSwiftUpdateCheck = 0800;
153-
LastUpgradeCheck = 0940;
153+
LastUpgradeCheck = 1020;
154154
ORGANIZATIONNAME = "Wilson Ding";
155155
TargetAttributes = {
156156
C8A7AA241DAC2FE80054C75C = {
157157
CreatedOnToolsVersion = 8.0;
158-
DevelopmentTeam = 585SNYAD83;
159-
LastSwiftMigration = 0920;
158+
LastSwiftMigration = 1020;
160159
ProvisioningStyle = Automatic;
161160
};
162161
C8A7AA2D1DAC2FE90054C75C = {
163162
CreatedOnToolsVersion = 8.0;
164163
DevelopmentTeam = 585SNYAD83;
165-
LastSwiftMigration = 0920;
164+
LastSwiftMigration = 1020;
166165
ProvisioningStyle = Automatic;
167166
};
168167
};
169168
};
170169
buildConfigurationList = C8A7AA1F1DAC2FE80054C75C /* Build configuration list for PBXProject "RandomUserSwift" */;
171170
compatibilityVersion = "Xcode 3.2";
172-
developmentRegion = English;
171+
developmentRegion = en;
173172
hasScannedForEncodings = 0;
174173
knownRegions = (
175174
en,
175+
Base,
176176
);
177177
mainGroup = C8A7AA1B1DAC2FE80054C75C;
178178
productRefGroup = C8A7AA261DAC2FE80054C75C /* Products */;
@@ -251,6 +251,7 @@
251251
isa = XCBuildConfiguration;
252252
buildSettings = {
253253
ALWAYS_SEARCH_USER_PATHS = NO;
254+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
254255
CLANG_ANALYZER_NONNULL = YES;
255256
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
256257
CLANG_CXX_LIBRARY = "libc++";
@@ -313,6 +314,7 @@
313314
isa = XCBuildConfiguration;
314315
buildSettings = {
315316
ALWAYS_SEARCH_USER_PATHS = NO;
317+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
316318
CLANG_ANALYZER_NONNULL = YES;
317319
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
318320
CLANG_CXX_LIBRARY = "libc++";
@@ -370,7 +372,7 @@
370372
CLANG_ENABLE_MODULES = YES;
371373
CODE_SIGN_IDENTITY = "";
372374
DEFINES_MODULE = YES;
373-
DEVELOPMENT_TEAM = 585SNYAD83;
375+
DEVELOPMENT_TEAM = "";
374376
DYLIB_COMPATIBILITY_VERSION = 1;
375377
DYLIB_CURRENT_VERSION = 1;
376378
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -382,8 +384,7 @@
382384
PRODUCT_NAME = "$(TARGET_NAME)";
383385
SKIP_INSTALL = YES;
384386
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
385-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
386-
SWIFT_VERSION = 4.0;
387+
SWIFT_VERSION = 5.0;
387388
};
388389
name = Debug;
389390
};
@@ -393,7 +394,7 @@
393394
CLANG_ENABLE_MODULES = YES;
394395
CODE_SIGN_IDENTITY = "";
395396
DEFINES_MODULE = YES;
396-
DEVELOPMENT_TEAM = 585SNYAD83;
397+
DEVELOPMENT_TEAM = "";
397398
DYLIB_COMPATIBILITY_VERSION = 1;
398399
DYLIB_CURRENT_VERSION = 1;
399400
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -404,8 +405,7 @@
404405
PRODUCT_BUNDLE_IDENTIFIER = com.wilsonding.RandomUserSwift;
405406
PRODUCT_NAME = "$(TARGET_NAME)";
406407
SKIP_INSTALL = YES;
407-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
408-
SWIFT_VERSION = 4.0;
408+
SWIFT_VERSION = 5.0;
409409
};
410410
name = Release;
411411
};
@@ -418,8 +418,7 @@
418418
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
419419
PRODUCT_BUNDLE_IDENTIFIER = com.wilsonding.RandomUserSwiftTests;
420420
PRODUCT_NAME = "$(TARGET_NAME)";
421-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
422-
SWIFT_VERSION = 4.0;
421+
SWIFT_VERSION = 5.0;
423422
};
424423
name = Debug;
425424
};
@@ -432,8 +431,7 @@
432431
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
433432
PRODUCT_BUNDLE_IDENTIFIER = com.wilsonding.RandomUserSwiftTests;
434433
PRODUCT_NAME = "$(TARGET_NAME)";
435-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
436-
SWIFT_VERSION = 4.0;
434+
SWIFT_VERSION = 5.0;
437435
};
438436
name = Release;
439437
};

RandomUserSwift.xcodeproj/xcshareddata/xcschemes/RandomUserSwift.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0940"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

RandomUserSwift/Users.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ enum Title: String, Codable {
128128
case monsieur
129129
// swiftlint:disable identifier_name
130130
case mr
131+
// swiftlint:enable identifier_name
131132
case mrs
132133
// swiftlint:disable identifier_name
133134
case ms
135+
// swiftlint:enable identifier_name
134136
}
135137

136138
struct Picture: Codable {

0 commit comments

Comments
 (0)