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

Commit

Permalink
Swift 5 update, project configuration update to latest settings, hand… (
Browse files Browse the repository at this point in the history
#39)

* Swift 5 update, project configuration update to latest settings, handled warnings

* Pods swift language update to 5.0, handled errors
  • Loading branch information
crtgregoric committed Apr 19, 2020
1 parent 717d8d6 commit c7adb16
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 47 deletions.
30 changes: 18 additions & 12 deletions Example/Fuse.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,23 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0940;
LastSwiftMigration = 1130;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0940;
LastSwiftMigration = 1130;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Fuse" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -416,6 +416,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -464,13 +465,16 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
607FACEE1AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -511,6 +515,8 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -525,8 +531,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -540,8 +546,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -561,8 +567,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -578,8 +584,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
24 changes: 10 additions & 14 deletions Example/Fuse.xcodeproj/xcshareddata/xcschemes/Fuse-Example.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -41,6 +41,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Fuse_Example.app"
BlueprintName = "Fuse_Example"
ReferencedContainer = "container:Fuse.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -53,17 +62,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Fuse_Example.app"
BlueprintName = "Fuse_Example"
ReferencedContainer = "container:Fuse.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -85,8 +83,6 @@
ReferencedContainer = "container:Fuse.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion Example/Fuse/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
UISearchBar.appearance().barTintColor = UIColor.candyGreen()
UISearchBar.appearance().tintColor = UIColor.white

Expand Down
4 changes: 2 additions & 2 deletions Example/Fuse/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class ViewController: UITableViewController {

func filterContentForSearchText(_ searchText: String) {
let boldAttrs = [
NSAttributedStringKey.font : UIFont.boldSystemFont(ofSize: 17),
NSAttributedStringKey.foregroundColor: UIColor.blue
NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 17),
NSAttributedString.Key.foregroundColor: UIColor.blue
]

let results = fuse.search(searchText, in: books)
Expand Down
27 changes: 16 additions & 11 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Tests: XCTestCase {
let results = fuse.search("silm", in: books)

XCTAssert(results[0].ranges.count == 1, "There is a matching range in the first result")
XCTAssert(results[0].ranges[0] == CountableClosedRange(4...7), "The range goes over the matched substring")
XCTAssert(results[0].ranges[0] == 4...7, "The range goes over the matched substring")
}

func testProtocolWeightedSearch1() {
Expand Down Expand Up @@ -180,7 +180,7 @@ class Tests: XCTestCase {
let results = fuse.search("silm", in: books)

XCTAssert(results[0].ranges.count == 1, "There is a matching range in the first result")
XCTAssert(results[0].ranges[0] == CountableClosedRange(4...7), "The range goes over the matched substring")
XCTAssert(results[0].ranges[0] == 4...7, "The range goes over the matched substring")
}

func testProtocolWeightedSearchTokenized() {
Expand Down

0 comments on commit c7adb16

Please sign in to comment.