Add copying bundles phase to trigger building Bundle

This commit is contained in:
Yuta Saito 2019-11-18 19:14:12 +09:00
parent e336f56093
commit 7669d60d66

View File

@ -763,12 +763,21 @@ public class PBXProjGenerator {
buildPhases += try target.postCompileScripts.map { try generateBuildScript(targetName: target.name, buildScript: $0) }
let resourcesBuildPhaseFiles = getBuildFilesForPhase(.resources) + copyResourcesReferences
let resourcesBuildPhaseFiles = getBuildFilesForPhase(.resources)
if !resourcesBuildPhaseFiles.isEmpty {
let resourcesBuildPhase = addObject(PBXResourcesBuildPhase(files: resourcesBuildPhaseFiles))
buildPhases.append(resourcesBuildPhase)
}
if !copyResourcesReferences.isEmpty {
let copyBundlesPhase = addObject(PBXCopyFilesBuildPhase(
dstSubfolderSpec: .resources,
name: "Copy Bundles to Resources directory",
files: copyResourcesReferences
))
buildPhases.append(copyBundlesPhase)
}
let swiftObjCInterfaceHeader = project.getCombinedBuildSetting("SWIFT_OBJC_INTERFACE_HEADER_NAME", target: target, config: project.configs[0]) as? String
if target.type == .staticLibrary