{"id":18217272,"url":"https://github.com/engali94/xcbuildkit","last_synced_at":"2026-02-11T04:31:39.454Z","repository":{"id":260794029,"uuid":"882343116","full_name":"engali94/XCBuildKit","owner":"engali94","description":"A type-safe Swift wrapper around xcodebuild that makes iOS/macOS build operations a breeze with async/await APIs.","archived":false,"fork":false,"pushed_at":"2024-11-02T19:25:19.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T10:45:44.498Z","etag":null,"topics":["api","build","cicd","ios","macos","spm","swift","xcode","xcodebuild","xcodebuildkit"],"latest_commit_sha":null,"homepage":"https://engali94.github.io/XCBuildKit/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/engali94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-02T15:18:34.000Z","updated_at":"2024-11-04T10:13:09.000Z","dependencies_parsed_at":"2024-12-21T12:30:35.528Z","dependency_job_id":"30b769a6-a36b-432b-bdb6-afc968061302","html_url":"https://github.com/engali94/XCBuildKit","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"b00bf1e051149afcf8a200d5c1c71b8056aae672"},"previous_names":["engali94/xcbuildkit"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engali94%2FXCBuildKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engali94%2FXCBuildKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engali94%2FXCBuildKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engali94%2FXCBuildKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engali94","download_url":"https://codeload.github.com/engali94/XCBuildKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248215192,"owners_count":21066622,"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":["api","build","cicd","ios","macos","spm","swift","xcode","xcodebuild","xcodebuildkit"],"created_at":"2024-11-03T17:04:15.704Z","updated_at":"2026-02-11T04:31:39.430Z","avatar_url":"https://github.com/engali94.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XCBuildKit\n\nXCBuildKit is a powerful Swift package that provides a clean, type-safe wrapper around Xcode build commands. It enables you to programmatically manage Xcode builds with a modern Swift API.\n\n[![Swift](https://img.shields.io/badge/Swift-5.5+-orange.svg)](https://swift.org)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Features\n\n- 🛠 Type-safe wrapper around `xcodebuild` commands\n- 🔍 Comprehensive build configuration validation\n- 🚀 Async/await support for build operations\n\n## Installation\n\nAdd XCBuildKit to your project using Swift Package Manager:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/engali94/XCBuildKit.git\", from: \"0.0.1\")\n]\n```\n\n## Quick Start\n\n```swift\nimport XCBuildKit\n\n// Initialize the build system\nlet xcodeBuild = XcodeBuild()\n\n// Configure build options using the convenience factory method\nlet options = XcodeBuildOptions.forBuild(\n    project: \"MyApp\",\n    scheme: \"MyApp\",\n    configuration: \"Release\",\n    sdk: .iPhoneOS,\n    destination: .iOSSimulator(device: \"iPhone 14\")\n)\n\n// Execute the build and handle real-time output\nfor await state in xcodeBuild.execute(.build, options: options) {\n    switch state {\n    case .inProgress(let message):\n        print(\"Building: \\(message)\")\n    case .completed:\n        print(\"Build completed successfully!\")\n    case .error(let message):\n        print(\"Build failed: \\(message)\")\n    }\n}\n```\n\n## Advanced Usage\n\n### Running Tests\n\n```swift\n// Configure test options\nlet testOptions = XcodeBuildOptions.forTesting(\n    project: \"MyApp\",\n    scheme: \"MyApp\",\n    destination: .iOSSimulator(device: \"iPhone 14\"),\n    testPlan: \"MyTestPlan\",\n    testConfiguration: nil,\n    testLanguage: nil,\n    testRegion: nil,\n    skipTesting: [],\n    onlyTesting: [\"MyAppTests/LoginTests\"],\n    testTargets: [],\n    enableCodeCoverage: true\n)\n\n// Execute tests with real-time feedback\nfor await state in xcodeBuild.execute(.test(testPlan: \"MyTestPlan\"), options: testOptions) {\n    switch state {\n    case .inProgress(let message):\n        print(\"Testing: \\(message)\")\n    case .completed:\n        print(\"Tests completed successfully!\")\n    case .error(let message):\n        print(\"Tests failed: \\(message)\")\n    }\n}\n```\n\n### Creating Archives\n\n```swift\n// Configure archive options\nlet archivePath = try ArchivePath(\"path/to/output.xcarchive\")\nlet archiveOptions = XcodeBuildOptions.forArchive(\n    project: \"MyApp\",\n    scheme: \"MyApp\",\n    configuration: \"Release\",\n    archivePath: archivePath,\n    allowProvisioningUpdates: true\n)\n\n// Create archive\nfor await state in xcodeBuild.execute(.archive, options: archiveOptions) {\n    switch state {\n    case .inProgress(let message):\n        print(\"Archiving: \\(message)\")\n    case .completed:\n        print(\"Archive created successfully!\")\n    case .error(let message):\n        print(\"Archive failed: \\(message)\")\n    }\n}\n```\n\n### Exporting Archives\n\n```swift\nlet exportOptions = try ExportOptions(\n    archivePath: \"path/to/archive.xcarchive\",\n    exportPath: \"path/to/export\",\n    optionsPlist: \"path/to/options.plist\"\n)\n\nlet options = XcodeBuildOptions.forExport(\n    project: \"MyApp\",\n    scheme: \"MyApp\",\n    exportOptions: exportOptions,\n    allowProvisioningUpdates: true\n)\n\nfor await state in xcodeBuild.execute(.exportArchive, options: options) {\n    switch state {\n    case .inProgress(let message):\n        print(\"Exporting: \\(message)\")\n    case .completed:\n        print(\"Export completed successfully!\")\n    case .error(let message):\n        print(\"Export failed: \\(message)\")\n    }\n}\n```\n\n## Error Handling\n\nXCBuildKit provides detailed error information through the `BuildState` enum:\n\n```swift\nfor await state in xcodeBuild.execute(.build, options: options) {\n    switch state {\n    case .error(let message):\n        if message.contains(\"No provisioning profile\") {\n            // Handle provisioning profile errors\n        } else if message.contains(\"Code signing\") {\n            // Handle code signing errors\n        } else {\n            // Handle other build errors\n        }\n    default:\n        break\n    }\n}\n```\n\n## Requirements\n\n- Xcode 13.0+\n- Swift 5.5+\n- macOS 11.0+\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengali94%2Fxcbuildkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengali94%2Fxcbuildkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengali94%2Fxcbuildkit/lists"}