Skip to content

Commit

Permalink
Skip compile sources for watch apps (#1185)
Browse files Browse the repository at this point in the history
* Skip compile sources build phase for watch2 apps if empty

* add changelog entry

* Fix tests

Co-authored-by: Yonas Kolb <[email protected]>
  • Loading branch information
evandcoleman and yonaskolb authored Mar 20, 2022
1 parent 07fa819 commit 7b9d95a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

## Next Version

### Added

- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata

### Fixed

- Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x
- Skip generating empty compile sources build phases for watch apps [#1185](https://github.com/yonaskolb/XcodeGen/issues/1185) @evandcoleman

### Added

- Added `coverageTargets` for target test schemes. This enables to gather code coverage for specific targets. [#1189](https://github.com/yonaskolb/XcodeGen/pull/1189) @gabriellanata

## 2.26.0

Expand Down
4 changes: 2 additions & 2 deletions Sources/ProjectSpec/XCProjExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ extension PBXProductType {

public var canSkipCompileSourcesBuildPhase: Bool {
switch self {
case .bundle, .stickerPack, .messagesApplication:
// Bundles, sticker packs and simple messages applications without sources should not include a
case .bundle, .watch2App, .stickerPack, .messagesApplication:
// Bundles, watch apps, sticker packs and simple messages applications without sources should not include a
// compile sources build phase. Doing so can cause Xcode to produce an error on build.
return true
default:
Expand Down
8 changes: 0 additions & 8 deletions Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,6 @@
isa = PBXNativeTarget;
buildConfigurationList = 6B5C5F08C0EF06457756E379 /* Build configuration list for PBXNativeTarget "App_watchOS" */;
buildPhases = (
91C895DE8170C96A75D29426 /* Sources */,
B7B71FA7D279029BF7A7FC7C /* Resources */,
C765431E5FF4B02F59DE79B0 /* Embed App Extensions */,
);
Expand Down Expand Up @@ -2706,13 +2705,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
91C895DE8170C96A75D29426 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
96BB43F4706B031DA45166E8 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down

0 comments on commit 7b9d95a

Please sign in to comment.