Set Code Sign On Copy to true for Embed Frameworks (#333)

* Headers build phase should be put on top of Compile build phase

* Add test

* Add changelog

* Set Code Sign On Copy to true for Embbed Frameworks

* Add changelog

* Update CHANGELOG
This commit is contained in:
(Alfred) 2019-05-02 23:16:16 +07:00 committed by Pedro Piñera Buendía
parent 1cce8eaf83
commit d89da1d290
3 changed files with 15 additions and 1 deletions

View File

@ -8,6 +8,18 @@ Please, check out guidelines: https://keepachangelog.com/en/1.0.0/
### Added ### Added
### Removed
### Fixed
- Set Code Sign On Copy to true for Embed Frameworks https://github.com/tuist/tuist/pull/333 by @dangthaison91
## 0.14.0
### Changed
### Added
- Adding support for project additional files https://github.com/tuist/tuist/pull/314 by @kwridan - Adding support for project additional files https://github.com/tuist/tuist/pull/314 by @kwridan
- Adding support for resource folder references https://github.com/tuist/tuist/pull/318 by @kwridan - Adding support for resource folder references https://github.com/tuist/tuist/pull/318 by @kwridan
- **Breaking** Swift 5 support https://github.com/tuist/tuist/pull/317 by @pepibumur. - **Breaking** Swift 5 support https://github.com/tuist/tuist/pull/317 by @pepibumur.

View File

@ -158,7 +158,7 @@ final class LinkGenerator: LinkGenerating {
guard let fileRef = fileElements.product(name: name) else { guard let fileRef = fileElements.product(name: name) else {
throw LinkGeneratorError.missingProduct(name: name) throw LinkGeneratorError.missingProduct(name: name)
} }
let buildFile = PBXBuildFile(file: fileRef) let buildFile = PBXBuildFile(file: fileRef, settings: ["ATTRIBUTES": ["CodeSignOnCopy"]])
pbxproj.add(object: buildFile) pbxproj.add(object: buildFile)
embedPhase.files?.append(buildFile) embedPhase.files?.append(buildFile)
} }

View File

@ -52,6 +52,8 @@ final class LinkGeneratorErrorTests: XCTestCase {
XCTAssertEqual(copyBuildPhase?.name, "Embed Frameworks") XCTAssertEqual(copyBuildPhase?.name, "Embed Frameworks")
let wakaBuildFile: PBXBuildFile? = copyBuildPhase?.files?.first let wakaBuildFile: PBXBuildFile? = copyBuildPhase?.files?.first
XCTAssertEqual(wakaBuildFile?.file, wakaFile) XCTAssertEqual(wakaBuildFile?.file, wakaFile)
let settings: [String: [String]]? = wakaBuildFile?.settings as? [String: [String]]
XCTAssertEqual(settings, ["ATTRIBUTES": ["CodeSignOnCopy"]])
} }
func test_generateEmbedPhase_throws_when_aProductIsMissing() throws { func test_generateEmbedPhase_throws_when_aProductIsMissing() throws {