From 364970e3ddc1bbe32c513162c6c811fde04e5a46 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 26 Dec 2017 17:41:23 -0800 Subject: [PATCH] Change CLI fileExtension to nil The fileExtension property is used upstream to determine the explicitFileType of the file reference. If that property exists but is empty Xcode crashes. Previously that was the case with the tool file type since the product target had an empty explicitFileType. With this change it now omits that property instead, and still has no extension. --- CHANGELOG.md | 1 + Sources/xcproj/PBXProductType.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee99df4a3..0e508d384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fixed - Fix Xcode 9.2 warning https://github.com/xcodeswift/xcproj/pull/209 by @keith +- macOS CLI targets now have a nil extension, instead of an empty string https://github.com/xcodeswift/xcproj/pull/208 by @keith ## 2.0.0 diff --git a/Sources/xcproj/PBXProductType.swift b/Sources/xcproj/PBXProductType.swift index 8daa0db2c..7b4b1f564 100644 --- a/Sources/xcproj/PBXProductType.swift +++ b/Sources/xcproj/PBXProductType.swift @@ -41,7 +41,7 @@ public enum PBXProductType: String, Decodable { case .appExtension, .tvExtension, .watchExtension, .watch2Extension, .messagesExtension, .stickerPack, .xcodeExtension: return "appex" case .commandLineTool: - return "" + return nil case .xpcService: return "xpc" case .ocUnitTestBundle: