mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Don't generate CFBundleExecutable for targets of type bundle
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user