Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from teambition/swift5
Browse files Browse the repository at this point in the history
swift 5
  • Loading branch information
HorexC authored Apr 11, 2019
2 parents 33415d8 + f0cb927 commit 6758783
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 74 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: objective-c
osx_image: xcode10.0
osx_image: xcode10.2
script:
- xcodebuild build test -workspace ManagedObjectAdapter.xcworkspace -scheme 'ManagedObjectAdapter iOS' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.0'
- xcodebuild build test -workspace ManagedObjectAdapter.xcworkspace -scheme 'ManagedObjectAdapter iOS' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.2'
10 changes: 6 additions & 4 deletions Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Teambition;
TargetAttributes = {
D3283CA91D48812300E1B445 = {
Expand All @@ -202,7 +202,7 @@
};
buildConfigurationList = D3283CA51D48812300E1B445 /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -291,6 +291,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -347,6 +348,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -406,7 +408,7 @@
PRODUCT_BUNDLE_IDENTIFIER = Teambition.ManagedObjectAdapter.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -423,7 +425,7 @@
PRODUCT_BUNDLE_IDENTIFIER = Teambition.ManagedObjectAdapter.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Example/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Hearst-DD/ObjectMapper" "3.3.0"
github "Hearst-DD/ObjectMapper" "3.4.2"
10 changes: 3 additions & 7 deletions Example/EventsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class EventsViewController: UITableViewController {
}

// MARK: - Helper
fileprivate func setupUI() {
private func setupUI() {
navigationItem.title = "Events"
tableView.tableFooterView = UIView()
}

fileprivate func loadData() {
private func loadData() {
guard let path = Bundle(identifier: "Teambition.ManagedObjectAdapter.Example")?.path(forResource: "events", ofType: "json") ?? Bundle.main.path(forResource: "events", ofType: "json") else {
return
}
Expand All @@ -49,11 +49,7 @@ class EventsViewController: UITableViewController {
return
}

guard let events = json?.compactMap({ (object) -> Event? in
return Event(object)
}) else {
return
}
let events = json.compactMap { Event($0) }
self.events = events
tableView.reloadData()
}
Expand Down
10 changes: 3 additions & 7 deletions Example/ExampleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ class ExampleViewController: UITableViewController {
}

// MARK: - Helper
fileprivate func setupUI() {
private func setupUI() {
navigationItem.title = "Example"
tableView.tableFooterView = UIView()
}

fileprivate func loadData() {
private func loadData() {
guard let path = Bundle(identifier: "Teambition.ManagedObjectAdapter.Example")?.path(forResource: "organizations", ofType: "json") ?? Bundle.main.path(forResource: "organizations", ofType: "json") else {
return
}
Expand All @@ -58,11 +58,7 @@ class ExampleViewController: UITableViewController {
return
}

guard let organizations = json?.compactMap({ (object) -> Organization? in
return Organization(object)
}) else {
return
}
let organizations = json.compactMap { Organization($0) }
self.organizations = organizations
tableView.reloadData()
}
Expand Down
4 changes: 2 additions & 2 deletions Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.6</string>
<string>0.0.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>6</string>
<string>7</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
10 changes: 3 additions & 7 deletions Example/ProjectsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ class ProjectsViewController: UITableViewController {
}

// MARK: - Life cycle
fileprivate func setupUI() {
private func setupUI() {
navigationItem.title = "Projects"
tableView.tableFooterView = UIView()
}

// MARK: - Helper
fileprivate func loadData() {
private func loadData() {
guard let path = Bundle(identifier: "Teambition.ManagedObjectAdapter.Example")?.path(forResource: "projects", ofType: "json") ?? Bundle.main.path(forResource: "projects", ofType: "json") else {
return
}
Expand All @@ -57,11 +57,7 @@ class ProjectsViewController: UITableViewController {
return
}

guard let projects = json?.compactMap({ (object) -> Project? in
return Project(object)
}) else {
return
}
let projects = json.compactMap { Project($0) }
self.projects = projects
tableView.reloadData()
}
Expand Down
19 changes: 11 additions & 8 deletions ManagedObjectAdapter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Teambition;
TargetAttributes = {
D3283C951D4880C500E1B445 = {
Expand All @@ -214,10 +214,11 @@
};
buildConfigurationList = D3283C901D4880C500E1B445 /* Build configuration list for PBXProject "ManagedObjectAdapter" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = D3283C8C1D4880C500E1B445;
productRefGroup = D3283C971D4880C500E1B445 /* Products */;
Expand Down Expand Up @@ -299,6 +300,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -358,6 +360,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -424,7 +427,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -444,7 +447,7 @@
PRODUCT_NAME = ManagedObjectAdapter;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -456,7 +459,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = Teambition.ManagedObjectAdapterTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -468,7 +471,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = Teambition.ManagedObjectAdapterTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -489,7 +492,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -512,7 +515,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 6758783

Please sign in to comment.