Set xcodeproj path in project.xcworkspace/contents.xcworkspacedata (#793)

* Set xcodeproj path in project.xcworkspace/contents.xcworkspacedata

* Update CHANGELOG.md
This commit is contained in:
Ken Tominaga 2020-02-28 12:40:37 -08:00 committed by GitHub
parent edbb8783a8
commit c0c998b429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 7 deletions

View File

@ -4,8 +4,9 @@
#### Fixed
- Revert "Add Base to known regions even if one doesn't exist" [#791](https://github.com/yonaskolb/XcodeGen/pull/792) @bryansum
- Set `defaultConfigurationName` for every target which is defined in a project. [#787](https://github.com/yonaskolb/XcodeGen/pull/787)
- Set `defaultConfigurationName` for every target which is defined in a project. [#787](https://github.com/yonaskolb/XcodeGen/pull/787) @ken0nek
- Set `TEST_TARGET_NAME` only when a project has UITest bundle. [#792](https://github.com/yonaskolb/XcodeGen/pull/792) @ken0nek
- Set xcodeproj path in project.xcworkspace/contents.xcworkspacedata [#793](https://github.com/yonaskolb/XcodeGen/pull/793) @ken0nek
## 2.13.1

View File

@ -32,7 +32,7 @@ public class ProjectGenerator {
}
func generateWorkspace() throws -> XCWorkspace {
let dataElement: XCWorkspaceDataElement = .file(XCWorkspaceDataFileRef(location: .self("")))
let dataElement: XCWorkspaceDataElement = .file(XCWorkspaceDataFileRef(location: .self(project.defaultProjectPath.lastComponent)))
let workspaceData = XCWorkspaceData(children: [dataElement])
return XCWorkspace(data: workspaceData)
}

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:Project.xcodeproj">
</FileRef>
</Workspace>

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:SPM.xcodeproj">
</FileRef>
</Workspace>

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:AnotherProject.xcodeproj">
</FileRef>
</Workspace>

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:Project.xcodeproj">
</FileRef>
</Workspace>

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:TestProject.xcodeproj">
</FileRef>
</Workspace>