Skip to content

Commit

Permalink
Fix header phase for static frameworks (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
wag-miles authored and brentleyjones committed Nov 6, 2019
1 parent 1cdb5dc commit c590558
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sources/ProjectSpec/XCProjExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension PBXProductType {
}

public var isFramework: Bool {
return self == .framework
return self == .framework || self == .staticFramework
}

public var isLibrary: Bool {
Expand Down
2 changes: 1 addition & 1 deletion Sources/XcodeGenKit/PBXProjGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Tests/XcodeGenKitTests/ProjectGeneratorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c590558

Please sign in to comment.