Skip to content

Commit

Permalink
Merge pull request #390 from Saik0s/knownRegion_#389
Browse files Browse the repository at this point in the history
Set knownRegions to en by default. Fix for #389
  • Loading branch information
yonaskolb authored Aug 31, 2018
2 parents 5802fe1 + 82d3c18 commit 43e465e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Master

- Fixed default settings for macOS unit-tests [387](https://github.com/yonaskolb/XcodeGen/pull/387) @frankdilo
- Added default value for knownRegions property [390](https://github.com/yonaskolb/XcodeGen/pull/390) @Saik0s

## 1.11.1

Expand Down
4 changes: 3 additions & 1 deletion Sources/XcodeGenKit/PBXProjGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ public class PBXProjGenerator {
.merged(project.attributes)
.merged(generateTargetAttributes() ?? [:])

pbxProject.object.knownRegions = sourceGenerator.knownRegions.sorted()
let knownRegions = sourceGenerator.knownRegions.sorted()
pbxProject.object.knownRegions = knownRegions.isEmpty ? ["en"] : knownRegions

let allTargets: [ObjectReference<PBXTarget>] = Array(targetObjects.values) + Array(targetAggregateObjects.values.map { ObjectReference(reference: $0.reference, object: $0.object) })
pbxProject.object.targets = allTargets
.sorted { $0.object.name < $1.object.name }
Expand Down

0 comments on commit 43e465e

Please sign in to comment.