Skip to content

Commit f5095a8

Browse files
committed
Swift 5
1 parent a1e12a8 commit f5095a8

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed

Package.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
// swift-tools-version:4.2
2-
// The swift-tools-version declares the minimum version of Swift required to build this package.
1+
// swift-tools-version:5.0
32

43
import PackageDescription
54

65
let package = Package(
76
name: "XcodeProject",
7+
platforms: [
8+
.macOS(.v10_14)
9+
],
810
products: [
9-
// Products define the executables and libraries produced by a package, and make them visible to other packages.
1011
.library(
1112
name: "XcodeProject",
1213
targets: ["XcodeProject"]),
1314
],
1415
dependencies: [
15-
// Dependencies declare other packages that this package depends on.
16-
// .package(url: /* package url */, from: "1.0.0"),
1716
],
1817
targets: [
19-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20-
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2118
.target(
2219
name: "XcodeProject",
2320
dependencies: []),

Sources/XcodeProject/Objects/Build Phases/PBXBuildPhase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class PBXBuildPhase: PBXObject {
2929
}
3030

3131
public func remove(file: PBXBuildFile) {
32-
guard let index = files.index(of: file) else { return }
32+
guard let index = files.firstIndex(of: file) else { return }
3333
files.remove(at: index)
3434
}
3535

Sources/XcodeProject/Objects/References/PBXGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class PBXGroup: PBXReference {
5454

5555
public func remove(child: PBXReference) {
5656
guard child.parent == self else { return }
57-
guard let index = children.index(of: child) else { return }
57+
guard let index = children.firstIndex(of: child) else { return }
5858
children.remove(at: index)
5959
self.child(child, didMoveTo: nil)
6060
}

Sources/XcodeProject/Workspace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension WorkspaceItem {
2626
print(location)
2727
var scheme: String = ""
2828
var path: String = location
29-
if let index = location.index(of: ":") {
29+
if let index = location.firstIndex(of: ":") {
3030
scheme = String(location[..<index])
3131
path = String(location[location.index(after: index)...])
3232
}

XcodeProject.xcodeproj/project.pbxproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330
isa = PBXProject;
331331
attributes = {
332332
LastSwiftUpdateCheck = 0810;
333-
LastUpgradeCheck = 0930;
333+
LastUpgradeCheck = 1020;
334334
ORGANIZATIONNAME = "Geoffrey Foster";
335335
TargetAttributes = {
336336
6CD222821DDD5C170058C7CD = {
@@ -347,10 +347,11 @@
347347
};
348348
buildConfigurationList = 6CD2227D1DDD5C170058C7CD /* Build configuration list for PBXProject "XcodeProject" */;
349349
compatibilityVersion = "Xcode 3.2";
350-
developmentRegion = English;
350+
developmentRegion = en;
351351
hasScannedForEncodings = 0;
352352
knownRegions = (
353353
en,
354+
Base,
354355
);
355356
mainGroup = 6CD222791DDD5C170058C7CD;
356357
productRefGroup = 6CD222841DDD5C180058C7CD /* Products */;
@@ -451,6 +452,7 @@
451452
isa = XCBuildConfiguration;
452453
buildSettings = {
453454
ALWAYS_SEARCH_USER_PATHS = NO;
455+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
454456
CLANG_ANALYZER_NONNULL = YES;
455457
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
456458
CLANG_CXX_LIBRARY = "libc++";
@@ -503,6 +505,7 @@
503505
SDKROOT = macosx;
504506
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
505507
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
508+
SWIFT_VERSION = 5.0;
506509
VERSIONING_SYSTEM = "apple-generic";
507510
VERSION_INFO_PREFIX = "";
508511
};
@@ -512,6 +515,7 @@
512515
isa = XCBuildConfiguration;
513516
buildSettings = {
514517
ALWAYS_SEARCH_USER_PATHS = NO;
518+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
515519
CLANG_ANALYZER_NONNULL = YES;
516520
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
517521
CLANG_CXX_LIBRARY = "libc++";
@@ -556,6 +560,7 @@
556560
MTL_ENABLE_DEBUG_INFO = NO;
557561
SDKROOT = macosx;
558562
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
563+
SWIFT_VERSION = 5.0;
559564
VERSIONING_SYSTEM = "apple-generic";
560565
VERSION_INFO_PREFIX = "";
561566
};
@@ -579,7 +584,6 @@
579584
PRODUCT_NAME = "$(TARGET_NAME)";
580585
SKIP_INSTALL = YES;
581586
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
582-
SWIFT_VERSION = 4.2;
583587
};
584588
name = Debug;
585589
};
@@ -600,7 +604,6 @@
600604
PRODUCT_BUNDLE_IDENTIFIER = "net.g-Off.XcodeProject";
601605
PRODUCT_NAME = "$(TARGET_NAME)";
602606
SKIP_INSTALL = YES;
603-
SWIFT_VERSION = 4.2;
604607
};
605608
name = Release;
606609
};
@@ -612,7 +615,6 @@
612615
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
613616
PRODUCT_BUNDLE_IDENTIFIER = "net.g-Off.XcodeProjectTests";
614617
PRODUCT_NAME = "$(TARGET_NAME)";
615-
SWIFT_VERSION = 4.2;
616618
};
617619
name = Debug;
618620
};
@@ -624,7 +626,6 @@
624626
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
625627
PRODUCT_BUNDLE_IDENTIFIER = "net.g-Off.XcodeProjectTests";
626628
PRODUCT_NAME = "$(TARGET_NAME)";
627-
SWIFT_VERSION = 4.2;
628629
};
629630
name = Release;
630631
};

XcodeProject.xcodeproj/xcshareddata/xcschemes/XcodeProject.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 = "0930"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
 (0)