Skip to content

Commit

Permalink
Update PlistValue to write BuildSetting correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
waltflanagan committed Jul 23, 2024
1 parent 976ab8f commit 0cc904d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Sources/XcodeProj/Utils/PlistValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,22 @@ extension PlistValue: Equatable {

// MARK: - Dictionary Extension (PlistValue)


Check warning on line 88 in Sources/XcodeProj/Utils/PlistValue.swift

View workflow job for this annotation

GitHub Actions / Swiftlint

Vertical Whitespace Violation: Limit vertical whitespace to a single empty line; currently 2 (vertical_whitespace)

Check warning on line 88 in Sources/XcodeProj/Utils/PlistValue.swift

View workflow job for this annotation

GitHub Actions / Swiftlint

Vertical Whitespace Violation: Limit vertical whitespace to a single empty line; currently 2 (vertical_whitespace)
extension Dictionary where Key == String, Value == BuildSetting {
func plist() -> PlistValue {
var dictionary: [CommentedString: PlistValue] = [:]
forEach { key, value in
switch value {
case .string(let stringValue):
dictionary[CommentedString(key)] = PlistValue.string(CommentedString(stringValue))
case .array(let arrayValue):
dictionary[CommentedString(key)] = arrayValue.plist()
}
}
return .dictionary(dictionary)
}
}

extension Dictionary where Key == String {
func plist() -> PlistValue {
var dictionary: [CommentedString: PlistValue] = [:]
Expand Down

0 comments on commit 0cc904d

Please sign in to comment.