Skip to content

Commit

Permalink
Fix Xcode 9.1 and Swift 4.0.2 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yvbeek committed Nov 7, 2017
1 parent 95d8b69 commit a7ce919
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 53 deletions.
4 changes: 3 additions & 1 deletion Examples/iOS Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = Building42;
TargetAttributes = {
82EF33EF1ECD330C002DC910 = {
Expand Down Expand Up @@ -398,6 +398,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E64D1C8B585D28877B982668 /* Pods-iOS Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "iOS Example/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
Expand All @@ -411,6 +412,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 45012B20641F7A3E629E72DA /* Pods-iOS Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "iOS Example/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
Expand Down
4 changes: 3 additions & 1 deletion Examples/macOS Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = Building42;
TargetAttributes = {
82EF34341ECD356A002DC910 = {
Expand Down Expand Up @@ -383,6 +383,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 8E5E5D46CE58DA0D0A2E0012 /* Pods-macOS Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "macOS Example/Info.plist";
Expand All @@ -396,6 +397,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 722CF00929C7546692EE60D7 /* Pods-macOS Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "macOS Example/Info.plist";
Expand Down
4 changes: 3 additions & 1 deletion Examples/tvOS Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = Building42;
TargetAttributes = {
82EF34191ECD33CF002DC910 = {
Expand Down Expand Up @@ -384,6 +384,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = A7812D37ACEF4DBABC9BCCF8 /* Pods-tvOS Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = "tvOS Example/Info.plist";
Expand All @@ -397,6 +398,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = C48A993D74159CC56A269E3A /* Pods-tvOS Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = "tvOS Example/Info.plist";
Expand Down
86 changes: 42 additions & 44 deletions Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Sources/Helpers/NSRegularExpression+Ext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extension NSRegularExpression {

extension String {
fileprivate var fullRange: NSRange {
return NSRange(location: 0, length: characters.count)
return NSRange(location: 0, length: count)
}

fileprivate func substring(with range: NSRange) -> String? {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Helpers/String+Ext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extension String {
}

public func truncate(count: Int, ellipses: Bool = true) -> String {
if characters.count < count { return self }
return String(characters.prefix(count)) + (ellipses ? "..." : "")
if self.count < count { return self }
return prefix(count) + (ellipses ? "..." : "")
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0910"
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 = "0900"
LastUpgradeVersion = "0910"
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 = "0900"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down

0 comments on commit a7ce919

Please sign in to comment.