From fde42399de2bef432ae54fa40368530ba6cd84e0 Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Sun, 17 Mar 2019 13:52:13 +1100 Subject: [PATCH 1/3] update to xcodeproj 6.6 --- CHANGELOG.md | 4 ++++ Docs/ProjectSpec.md | 4 +++- Package.resolved | 4 ++-- Package.swift | 2 +- Sources/ProjectSpec/Linkage.swift | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e15f9253..b2b71243 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Added ability to set `link` to false in framework dependencies [#532](https://github.com/yonaskolb/XcodeGen/pull/532) @dimatosaurus - Added `missingConfigFiles` to `options.disabledValidations` to optionally skip checking for the existence of config files. - Added ability to define a per-platform `deploymentTarget` for Multi-Platform targets. [#510](https://github.com/yonaskolb/XcodeGen/pull/510) @ainopara +- Added support for `app-extension.intents-service` target type [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb #### Changed - **DEPRECATION**: Placeholders `$target_name` and `$platform` have been deprecated in favour of `${target_name}` and `${platform}`. Support for the old placeholders will be removed in a future version [#533](https://github.com/yonaskolb/XcodeGen/pull/533) @tomquist @@ -35,6 +36,9 @@ [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.2.0...2.3.0) +#### Changed +- Updated to xcodeproj 6.6 which includes project writing performance improvements [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb + ## 2.2.0 #### Added diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index b610a72e..7f804069 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -227,9 +227,10 @@ This will provide default build settings for a certain product type. It can be a - `application.messages` - `application.watchapp` - `application.watchapp2` +- `app-extension` - `app-extension.messages` - `app-extension.messages-sticker-pack` -- `app-extension` +- `app-extension.intents-service` - `bundle` - `bundle.unit-test` - `bundle.ui-testing` @@ -242,6 +243,7 @@ This will provide default build settings for a certain product type. It can be a - `tv-app-extension` - `watchkit-extension` - `watchkit2-extension` +- `xcode-extension` - `xpc-service` - ``""`` (used for legacy targets) diff --git a/Package.resolved b/Package.resolved index fad2b4b4..37f7c688 100644 --- a/Package.resolved +++ b/Package.resolved @@ -69,8 +69,8 @@ "repositoryURL": "https://github.com/tuist/xcodeproj.git", "state": { "branch": null, - "revision": "8e15cc74149ee946b7ae125685177915b4ff7317", - "version": "6.4.0" + "revision": "3fe1bd763072c81050b867d34db56d11cb9085bb", + "version": "6.6.0" } }, { diff --git a/Package.swift b/Package.swift index e0a50310..78112db1 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( .package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "4.1.0"), .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.0"), .package(url: "https://github.com/onevcat/Rainbow.git", from: "3.0.0"), - .package(url: "https://github.com/tuist/xcodeproj.git", .exact("6.4.0")), + .package(url: "https://github.com/tuist/xcodeproj.git", .exact("6.6.0")), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "5.2.0"), ], targets: [ diff --git a/Sources/ProjectSpec/Linkage.swift b/Sources/ProjectSpec/Linkage.swift index ec2b71e1..166a8681 100644 --- a/Sources/ProjectSpec/Linkage.swift +++ b/Sources/ProjectSpec/Linkage.swift @@ -16,6 +16,7 @@ extension Target { .bundle, .commandLineTool, .instrumentsPackage, + .intentsServiceExtension, .messagesApplication, .messagesExtension, .ocUnitTestBundle, From 16bc081944b7aaf3f5842ab2c3e7442a793ec5cc Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Mon, 1 Apr 2019 20:15:38 +1100 Subject: [PATCH 2/3] update to xcodeproj 6.7 --- Package.resolved | 4 ++-- Package.swift | 2 +- Tests/XcodeGenKitTests/ProjectGeneratorTests.swift | 8 ++++---- Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Package.resolved b/Package.resolved index 37f7c688..db29fe0a 100644 --- a/Package.resolved +++ b/Package.resolved @@ -69,8 +69,8 @@ "repositoryURL": "https://github.com/tuist/xcodeproj.git", "state": { "branch": null, - "revision": "3fe1bd763072c81050b867d34db56d11cb9085bb", - "version": "6.6.0" + "revision": "065f348754b6155b8037dc43876a8f2ee354b95d", + "version": "6.7.0" } }, { diff --git a/Package.swift b/Package.swift index 78112db1..1249be28 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( .package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "4.1.0"), .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.0"), .package(url: "https://github.com/onevcat/Rainbow.git", from: "3.0.0"), - .package(url: "https://github.com/tuist/xcodeproj.git", .exact("6.6.0")), + .package(url: "https://github.com/tuist/xcodeproj.git", .exact("6.7.0")), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "5.2.0"), ], targets: [ diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 2f7dc633..7ad7d420 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -598,7 +598,7 @@ class ProjectGeneratorTests: XCTestCase { if let expectedResourceFiles = expectedResourceFiles[target.name] { try expect(resourcesPhases.count) == (expectedResourceFiles.isEmpty ? 0 : 1) if !expectedResourceFiles.isEmpty { - let resourceFiles = resourcesPhases[0].files + let resourceFiles = (resourcesPhases[0].files ?? []) .compactMap { $0.file } .map { $0.nameOrPath } try expect(Set(resourceFiles)) == expectedResourceFiles @@ -611,7 +611,7 @@ class ProjectGeneratorTests: XCTestCase { let expectedLinkedFiles = expectedLinkedFiles[target.name]! try expect(frameworkPhases.count) == (expectedLinkedFiles.isEmpty ? 0 : 1) if !expectedLinkedFiles.isEmpty { - let linkFrameworks = frameworkPhases[0].files + let linkFrameworks = (frameworkPhases[0].files ?? []) .compactMap { $0.file?.nameOrPath } try expect(Set(linkFrameworks)) == expectedLinkedFiles } @@ -620,7 +620,7 @@ class ProjectGeneratorTests: XCTestCase { if let expectedEmbeddedFrameworks = expectedEmbeddedFrameworks[target.name] { try expect(copyFilesPhases.count) == (expectedEmbeddedFrameworks.isEmpty ? 0 : 1) if !expectedEmbeddedFrameworks.isEmpty { - let copyFiles = copyFilesPhases[0].files + let copyFiles = (copyFilesPhases[0].files ?? []) .compactMap { $0.file?.nameOrPath } try expect(Set(copyFiles)) == expectedEmbeddedFrameworks } @@ -871,7 +871,7 @@ class ProjectGeneratorTests: XCTestCase { } let frameworkPhases = nativeTarget.buildPhases.compactMap { $0 as? PBXFrameworksBuildPhase } - let frameworkBuildFiles = frameworkPhases[0].files + let frameworkBuildFiles = frameworkPhases[0].files ?? [] let buildFileSettings = frameworkBuildFiles.map { $0.settings } try expect(frameworkBuildFiles.count) == 2 diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 0ac104ea..97c7dc9c 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -95,8 +95,8 @@ class SourceGeneratorTests: XCTestCase { .first(where: { $0.file == fileReference }) else { throw failure("Cant find build file") } - try expect(buildPhase?.files.count) == 1 - try expect(buildPhase?.files.contains(buildFile)) == true + try expect(buildPhase?.files?.count) == 1 + try expect(buildPhase?.files?.contains(buildFile)) == true } $0.it("generates core data models") { @@ -518,7 +518,7 @@ class SourceGeneratorTests: XCTestCase { let sourcesBuildPhase = pbxProj.buildPhases.first(where: { $0.buildPhase == BuildPhase.sources })! - try expect(sourcesBuildPhase.files.count) == 1 + try expect(sourcesBuildPhase.files?.count) == 1 } $0.it("add only carthage dependencies with same platform") { @@ -609,7 +609,7 @@ extension PBXProj { let buildFile = buildFiles .first(where: { $0.file === fileReference }) let actualBuildPhase = buildFile - .flatMap { buildFile in buildPhases.first { $0.files.contains(buildFile) } }?.buildPhase + .flatMap { buildFile in buildPhases.first { $0.files?.contains(buildFile) ?? false } }?.buildPhase var error: String? if let buildPhase = buildPhase.buildPhase { From 036c68885a842d53025832a3073e285bd48a2d9c Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Mon, 1 Apr 2019 20:26:46 +1100 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2b71243..7018e4fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Next Version +#### Added +- Added support for `app-extension.intents-service` target type [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb + +#### Changed +- Updated to xcodeproj 6.7.0 including its performance improvements [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb + ## 2.4.0 #### Fixed: @@ -21,7 +27,6 @@ - Added ability to set `link` to false in framework dependencies [#532](https://github.com/yonaskolb/XcodeGen/pull/532) @dimatosaurus - Added `missingConfigFiles` to `options.disabledValidations` to optionally skip checking for the existence of config files. - Added ability to define a per-platform `deploymentTarget` for Multi-Platform targets. [#510](https://github.com/yonaskolb/XcodeGen/pull/510) @ainopara -- Added support for `app-extension.intents-service` target type [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb #### Changed - **DEPRECATION**: Placeholders `$target_name` and `$platform` have been deprecated in favour of `${target_name}` and `${platform}`. Support for the old placeholders will be removed in a future version [#533](https://github.com/yonaskolb/XcodeGen/pull/533) @tomquist @@ -36,9 +41,6 @@ [Commits](https://github.com/yonaskolb/XcodeGen/compare/2.2.0...2.3.0) -#### Changed -- Updated to xcodeproj 6.6 which includes project writing performance improvements [#536](https://github.com/yonaskolb/XcodeGen/pull/536) @yonaskolb - ## 2.2.0 #### Added