xcode-project-setup

Adds Swift Package dependencies and links config files to Xcode projects via a Swift script.

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill xcode-project-setup-ferrarifankid04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xcode-project-setup
Source: https://github.com/ferrarifankid04/ai-skills-public/tree/main/antigravity/plugins/firebase/skills/xcode_project_setup
Command: npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill xcode-project-setup-ferrarifankid04

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Modifying Xcode project files (.pbxproj) by hand or with fragile Ruby-based tools is error-prone and often breaks projects. This Skill safely adds Swift Package Manager dependencies (like Firebase or Alamofire) and links configuration files to Xcode projects using a native Swift script, avoiding manual .pbxproj edits entirely. ## Core Features & Use Cases - SPM Package Installation: Adds package repository dependencies and automatically links product modules to the main target's Frameworks build phase in one step. - Config File Linking: Automatically links files like GoogleService-Info.plist to the resources build phase via the --plist flag. - Linker Flag Safety: Automatically injects the -ObjC flag into OTHER_LDFLAGS when adding Firebase products, preventing fatal runtime crashes from stripped Objective-C categories. - Use Case: You are building an iOS app and need Firebase Authentication and Firestore. Instead of manually configuring the project in Xcode, run the bundled Swift script to add the firebase-ios-sdk package, link FirebaseCore, FirebaseAuth, and FirebaseFirestore, and attach your GoogleService-Info.plist in a single idempotent command. ## Quick Start Ask the AI to add the Firebase iOS SDK with FirebaseAuth and FirebaseFirestore to your Xcode project using the xcode-project-setup skill, providing the path to your .xcodeproj and GoogleService-Info.plist.

Frequently Asked Questions about xcode-project-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Firebase to an Xcode project from the command line?

Run the bundled xcode_spm_setup Swift script with your .xcodeproj path, the firebase-ios-sdk repository URL, a version, the --plist flag pointing to GoogleService-Info.plist, and the products to link such as FirebaseCore and FirebaseAuth. The script adds the package dependency and links the modules automatically.

How to add Swift Package Manager dependencies to Xcode without manual linking?

Use the xcode_spm_setup script, which handles both adding the package repository dependency and linking the product modules to the main target's Frameworks build phase. Pass the repo URL, version requirement, and product names as arguments.

Can I use Ruby or the xcodeproj gem to modify .pbxproj files?

No, this Skill strictly forbids Ruby, Rails, and gems like xcodeproj. All project manipulation must use the provided Swift script, with Node.js or TypeScript allowed only as a last resort.

Why does Firebase crash with 'Unexpectedly found nil' after SPM setup?

The Apple linker strips Objective-C categories and +load methods from statically linked Firebase SDKs, causing runtime crashes. The script automatically injects the -ObjC flag into OTHER_LDFLAGS to prevent this; verify the flag exists in build settings if issues persist.

What are the requirements for running the xcode_spm_setup script?

You need a macOS environment with the Swift toolchain installed, verified by running swift --version, and an existing .xcodeproj created via Xcode. If no project exists, you must create an empty one in Xcode first.