Don't generate CFBundleExecutable for targets of type bundle

This commit is contained in:
Franz Busch
2019-10-22 09:39:22 +02:00
parent a03c960a35
commit b5773eff6a
3 changed files with 40 additions and 4 deletions
+10 -4
View File
@@ -8,20 +8,26 @@ public class InfoPlistGenerator {
Default info plist attributes taken from:
/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project Templates/Base/Base_DefinitionsInfoPlist.xctemplate/TemplateInfo.plist
*/
var defaultInfoPlist: [String: Any] = {
private func generateDefaultInfoPlist(target: Target) -> [String: Any] {
var dictionary: [String: Any] = [:]
dictionary["CFBundleIdentifier"] = "$(PRODUCT_BUNDLE_IDENTIFIER)"
dictionary["CFBundleInfoDictionaryVersion"] = "6.0"
dictionary["CFBundleExecutable"] = "$(EXECUTABLE_NAME)"
dictionary["CFBundleName"] = "$(PRODUCT_NAME)"
dictionary["CFBundleDevelopmentRegion"] = "$(DEVELOPMENT_LANGUAGE)"
dictionary["CFBundleShortVersionString"] = "1.0"
dictionary["CFBundleVersion"] = "1"
// Bundles should not contain any CFBundleExecutable otherwise they will be rejected when uploading.
if target.type != .bundle {
dictionary["CFBundleExecutable"] = "$(EXECUTABLE_NAME)"
}
return dictionary
}()
}
public func generateProperties(target: Target) -> [String: Any] {
var targetInfoPlist = defaultInfoPlist
var targetInfoPlist = generateDefaultInfoPlist(target: target)
switch target.type {
case .uiTestBundle,
.unitTestBundle: