Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Read a project
let project = try! XcodeProj(path: "myproject.xcodeproj")
let buildFiles = project.pbxproj.objects.buildFiles
let buildConfigurations = project.pbxproj.objects.buildConfigurations
// Read a workspace
let workspace = try! XCWorkspace(path: "myworkspace.workspace")
let projects = workspace.data.references.map { $0.project }
// Read a config file
let xcconfig = try! XCConfig(path: "MyConfig.xcconfig")
let buildDir = xcconfig.buildSettings["CONFIGURATION_BUILD_DIR"]
// Write models
pbxproj.write(path: “path/project.pbxproj”)
xcconfig.write(path: “path/config.xcconfig”)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.