{"id":13342780,"url":"https://github.com/0x973/XcodeManager","last_synced_at":"2025-03-12T02:32:40.059Z","repository":{"id":37680773,"uuid":"129873626","full_name":"0x973/XcodeManager","owner":"0x973","description":"A swift module to manipulate Xcode projects(project.pbxproj),written in swift","archived":false,"fork":false,"pushed_at":"2022-06-22T04:01:31.000Z","size":69,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-07-30T21:05:20.528Z","etag":null,"topics":["pbxproj","swift","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0x973.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-17T08:41:06.000Z","updated_at":"2023-09-06T08:22:07.000Z","dependencies_parsed_at":"2022-07-28T20:39:09.125Z","dependency_job_id":null,"html_url":"https://github.com/0x973/XcodeManager","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x973%2FXcodeManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x973%2FXcodeManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x973%2FXcodeManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x973%2FXcodeManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x973","download_url":"https://codeload.github.com/0x973/XcodeManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221265581,"owners_count":16788059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pbxproj","swift","xcode"],"created_at":"2024-07-29T19:30:03.576Z","updated_at":"2024-10-24T02:30:32.580Z","avatar_url":"https://github.com/0x973.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XcodeManager\n\n![Build Status](https://github.com/0x973/XcodeManager/actions/workflows/swift.yml/badge.svg?branch=master)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-00D835.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Platform](https://img.shields.io/badge/Platform-OSX-green.svg)](https://github.com/0x973/XcodeManager)\n\nThe better way to manage the Xcode project file (project.pbxproj) in swift.\nThis swift module lets you automate the modification process.\n\n## Requirements\n\n- macOS 10.12+\n- Xcode 8+\n\n## Integration\n\n#### Swift Package Manager\n```swift\n.package(url: \"https://github.com/0x973/XcodeManager.git\", from: \"0.2.0\")\n```\n\n#### Carthage\nYou can use [Carthage](https://github.com/Carthage/Carthage) to install `XcodeManager` by adding it to your Cartfile:\n```\ngithub \"0x973/XcodeManager\" ~\u003e 0.2.0\n```\n\n## Usage\n0. import module.\n\n```swift\nimport XcodeManager\n```\n\n1. Initialize the Xcode project file.\n\n```swift\nvar project = try? XcodeManager(projectFile: \"../.../xxx.xcodeproj\", printLog: true)\n```\n\n2. How to add static library in Xcode project?\n\n```swift\nproject.linkStaticLibrary(\"../.../test.a\")\n```\n\n3. How to add framework in Xcode project?\n\n```swift\nproject.linkFramework(\"../.../test.framework\")\n```\n\n4. How to add resources folder in Xcode project?\n\n```swift\nproject.addFolder(\"../.../test/\")\n```\n\n5. How to add a single resources file in Xcode project?\n\n```swift\nproject.addFile(\"../.../test.txt\")\n```\n\n6. How to modify the product name (display name)?\n\n```swift\nproject.setProductName(\"TestProduct\")\n```\n\n7. How to modify the Bundle Identifier?\n\n```swift\nproject.setBundleId(\"cn.x0x01.TestProduct\")\n```\n\n8. How to add new \u003cLibrary Search Paths\u003e value?\n\n```swift\nproject.setLibrarySearchPathValue(\"$(PROJECT_DIR)/TestProduct/Folder\")\n```\n\n9. How to add new \u003cFramework Search Paths\u003e value?\n\n```swift\nproject.setFrameworkSearchPathValue(\"$(PROJECT_DIR)/TestProduct/Folder\")\n```\n\n10. How to control the CodeSignStyle(manual OR automatic)?\n\n```swift\nproject.setCodeSignStyle(type: .automatic)\nproject.setCodeSignStyle(type: .manual)\n```\n\n11. Complete modification? Write to a .pbxproj file!\n\n```swift\nlet isSaveSuccess = try? project.save()\nif (isSaveSuccess) {\n\tprint(\"Done!\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x973%2FXcodeManager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x973%2FXcodeManager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x973%2FXcodeManager/lists"}