Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PBXTarget Related Properties and Diff Fixes #241

Merged
merged 4 commits into from
Mar 7, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don’t write buildRules for PBXAggregateTarget
Xcode doesn’t support build rules for PBXAggregateTarget. Although the UI shows the Build Rules tab, they’re never written to the file. Update xcproj to follow the same behavior to eliminate diffs.
  • Loading branch information
briantkelley committed Mar 7, 2018
commit 10ab658be8e85fbac99dc09eda388cd55da649c8
4 changes: 2 additions & 2 deletions Sources/xcproj/PBXTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public class PBXTarget: PBXObject {
return .string(CommentedString(buildPhase, comment: comment))
})

// Xcode doesn't write empty PBXLegacyTarget buildRules
if !(self is PBXLegacyTarget) || !buildRules.isEmpty {
// Xcode doesn't write PBXAggregateTarget buildRules or empty PBXLegacyTarget buildRules
if !(self is PBXAggregateTarget), !(self is PBXLegacyTarget) || !buildRules.isEmpty {
dictionary["buildRules"] = .array(buildRules.map {.string(CommentedString($0))})
}

Expand Down