Fix header phase for static frameworks (#705)

This commit is contained in:
wag-miles 2019-11-06 12:09:20 -08:00 committed by Brentley Jones
parent 1cdb5dcea3
commit c5905581d5
4 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@
#### Fixed
- Improved variable expansion runtime [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari
- Fixed missing headers for static framework targets [#705](https://github.com/yonaskolb/XcodeGen/pull/705) @wag-miles
#### Changed
- Deprecated `$old_form` variables in favor of `${new_form}` variables [#704](https://github.com/yonaskolb/XcodeGen/pull/704) @rcari

View File

@ -15,7 +15,7 @@ extension PBXProductType {
}
public var isFramework: Bool {
return self == .framework
return self == .framework || self == .staticFramework
}
public var isLibrary: Bool {

View File

@ -710,7 +710,7 @@ public class PBXProjGenerator {
let headersBuildPhaseFiles = getBuildFilesForPhase(.headers)
if !headersBuildPhaseFiles.isEmpty {
if target.type == .framework || target.type == .dynamicLibrary {
if target.type.isFramework || target.type == .dynamicLibrary {
let headersBuildPhase = addObject(PBXHeadersBuildPhase(files: headersBuildPhaseFiles))
buildPhases.append(headersBuildPhase)
} else {

View File

@ -739,7 +739,7 @@ class ProjectGeneratorTests: XCTestCase {
try expect(app3OtherLinkerSettings.contains("-ObjC")) == true
}
$0.it("copies Swfit Objective-C Interface Header") {
$0.it("copies Swift Objective-C Interface Header") {
let swiftStaticLibraryWithHeader = Target(
name: "swiftStaticLibraryWithHeader",
type: .staticLibrary,