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 support for WorkspaceSettings #359

Merged
merged 3 commits into from
Jan 6, 2019
Merged

Conversation

pepicrft
Copy link
Contributor

@pepicrft pepicrft commented Jan 5, 2019

Resolves #358

Short description 📝

Workspaces contain a WorkspaceSettings.xcsettings file which contains settings such as a the build system that Xcode should use. xcodeproj does not have support for that file (yet).

Solution 📦

Add support for parsing and writing WorkspaceSettings.xcsettings files.

Implementation 👩‍💻👨‍💻

  • Add WorkspaceSettings model.
  • Change buildSystem to be of type BuildSystem instead of String?
  • Add a method to write the file back to disk.
  • Add a workspaceSettings attribute to the XCSharedData model.

Note: There are some extra changes as a result of running swiftformat for the project. Those changes have nothing to do with bringing the feature onto the project.

@pepicrft pepicrft self-assigned this Jan 5, 2019
/// It represents the WorkspaceSettings.xcsettings file under a workspace data directory.
public class WorkspaceSettings: Decodable {
/// Workspace build system.
public let buildSystem: String?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to define a new type and use it instead of String?:

enum BuildSystem {
  case original
  case new
}

@yonaskolb
Copy link
Collaborator

Awesome! 👏
Perhaps master could have swift format applied? It would make the changes here easier to see

@pepicrft pepicrft changed the title [WIP] Add support for WorkspaceSettings Add support for WorkspaceSettings Jan 6, 2019
@pepicrft pepicrft merged commit 7f3a8a6 into master Jan 6, 2019
@pepicrft pepicrft deleted the use-modern-build-system branch January 6, 2019 11:28
@johndpope
Copy link

cool cool - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants