
Xcode Project Setup
Programmatically configure Xcode projects and Swift Package Manager dependencies when adding Firebase or iOS targets to a repo.
Overview
xcode-project-setup is an agent skill for the Build phase that helps configure Xcode projects and SPM dependencies when integrating Firebase on iOS.
Install
npx skills add https://github.com/firebase/agent-skills --skill xcode-project-setupWhat is this skill?
- Swift Package Manager setup with XcodeProj (tuist/XcodeProj) for manipulating .xcodeproj
- Dependency pins reference AEXML, PathKit, Spectre, and XcodeProj for automation scripts
- macOS 13+ Swift tools 5.9 package layout for xcode_spm_setup-style tooling
- Ignores patterns for DerivedData, xcuserdata, and .swiftpm noise suited to agent-edited repos
- Firebase agent-skills family skill for repeatable Xcode project bootstrap
- XcodeProj dependency pin version 8.27.7
- Swift tools version 5.9
- macOS platform minimum v13 in package snippet
Adoption & trust: 35.8k installs on skills.sh; 345 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need Firebase or SPM packages in an Xcode project but manual project.pbxproj edits are error-prone for an agent-assisted solo build.
Who is it for?
Indie iOS developers on Mac using Claude/Cursor to add Firebase and SPM deps via scripted XcodeProj changes.
Skip if: Android-only stacks, no-macOS environments, or teams that only use Xcode GUI without repo-level project generation.
When should I use this skill?
Setting up or modifying an Xcode project and Swift Package Manager layout for Firebase iOS integration.
What do I get? / Deliverables
An Xcode project and Swift package layout aligned with Firebase agent-skills automation, ready for SDK integration and local builds on macOS.
- Updated Xcode project configuration
- Package.swift / SPM resolution suitable for Firebase SDKs
Recommended Skills
Journey fit
iOS project scaffolding with SPM and XcodeProj belongs in the build phase when integrating Firebase and shipping a mobile client. Touches XcodeProj, Package.swift, and project graph edits—integration work linking SDKs into an Xcode workspace.
How it compares
Firebase-flavored Xcode/SPM integration skill—not Flutter/React Native setup and not App Store Connect launch automation.
Common Questions / FAQ
Who is xcode-project-setup for?
Solo builders shipping iOS apps with Firebase who want agents to modify Xcode and SwiftPM project files using the Firebase agent-skills playbook.
When should I use xcode-project-setup?
During Build integrations when creating or updating an Xcode workspace, adding Firebase SDK packages, or syncing SPM pins before device testing.
Is xcode-project-setup safe to install?
Expect filesystem and git changes to project files; review Security Audits on this Prism page and diff .xcodeproj edits before committing.
SKILL.md
READMESKILL.md - Xcode Project Setup
.DS_Store /.build /Packages /*.xcodeproj xcuserdata/ DerivedData/ .swiftpm/configuration/project.xcworkspace/ .swiftpm/xcode/ .swiftpm/xcode/xcuserdata/ { "pins" : [ { "identity" : "aexml", "kind" : "remoteSourceControl", "location" : "https://github.com/tadija/AEXML.git", "state" : { "revision" : "db806756c989760b35108146381535aec231092b", "version" : "4.7.0" } }, { "identity" : "pathkit", "kind" : "remoteSourceControl", "location" : "https://github.com/kylef/PathKit.git", "state" : { "revision" : "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", "version" : "1.0.1" } }, { "identity" : "spectre", "kind" : "remoteSourceControl", "location" : "https://github.com/kylef/Spectre.git", "state" : { "revision" : "26cc5e9ae0947092c7139ef7ba612e34646086c7", "version" : "0.10.1" } }, { "identity" : "xcodeproj", "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/XcodeProj.git", "state" : { "revision" : "b1caa062d4aaab3e3d2bed5fe0ac5f8ce9bf84f4", "version" : "8.27.7" } } ], "version" : 2 } // swift-tools-version: 5.9 import PackageDescription let package = Package( name: "xcode_spm_setup", platforms: [.macOS(.v13)], dependencies: [ .package(url: "https://github.com/tuist/XcodeProj.git", .upToNextMajor(from: "8.27.7")), ], targets: [ .executableTarget( name: "xcode_spm_setup", dependencies: ["XcodeProj"], path: "Sources" ) ] ) import Foundation import XcodeProj import PathKit func isUserScriptSandboxingEnabled(project: PBXProj) -> Bool { guard let target = project.projects.first else { print("Error: No project targets found") return false } for configuration in target.buildConfigurationList?.buildConfigurations ?? [] { if let userSandbox = configuration.buildSettings["ENABLE_USER_SCRIPT_SANDBOXING"] as? String { return userSandbox.uppercased() == "YES" } } // If the value is absent, assume it is the default "YES" return true } func hasCrashlyticsRunScriptBuildPhase(project: PBXProj) -> Bool { guard let nativeTargets = project.nativeTargets.first else { return false } for phase in nativeTargets.buildPhases { if phase.buildPhase == BuildPhase.runScript, let scriptPhase = phase as? PBXShellScriptBuildPhase { if let script = scriptPhase.shellScript, script.contains("Crashlytics") { return true } } } return false } func addCrashlyticsRunScriptBuildPhase(project: PBXProj) { guard let nativeTarget = project.nativeTargets.first else { print("Error: couldn't add the Crashlytics Run Script Build phase automatically, please add it manually") return } var inputPaths = [ "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}", "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}", "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist", "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist", "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)" ] if isUserScriptSandboxingEnabled(project: project) { inputPaths.append("${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}.debug.dylib") } let phase = PBXShellScriptBuildPhase( files: [], inputPaths: inputPaths, outputPaths: [], shellPath: "/bin/sh", shellScript: "\"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\"\n", runOnlyForDeploymentPostprocessing: false ) project.add(object: phase) nativeTarget.buildPhases.append(phase) } func setDwarfW