xcode-project-setup

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

2|Updated Mar 7, 2025
One-click install
npx skills add https://github.com/AbdelrhmanUZaki/KnowledgeNuggets --skill xcode-project-setup-abdelrhmanuzaki
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xcode-project-setup
Source: https://github.com/AbdelrhmanUZaki/KnowledgeNuggets/tree/main/2-setup/shared/gemini/config/plugins/firebase/skills/xcode_project_setup
Command: npx skills add https://github.com/AbdelrhmanUZaki/KnowledgeNuggets --skill xcode-project-setup-abdelrhmanuzaki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Modifying Xcode project files (.pbxproj) by hand or with fragile text parsing is error-prone, and Ruby-based tools like the xcodeproj gem add unwanted dependencies. This Skill safely installs Swift Package Manager dependencies (such as Firebase or Alamofire) and links configuration files into Xcode projects using a native Swift script. ## Core Features & Use Cases - SPM Dependency Installation: Adds a package repository dependency and automatically links the specified product modules to the main target's Frameworks build phase in one step. - Config File Linking: Optionally links files like GoogleService-Info.plist into the resources build phase via the --plist flag. - Firebase Safety: Automatically injects the -ObjC linker flag into OTHER_LDFLAGS when adding Firebase products, preventing runtime crashes from stripped Objective-C categories. - Use Case: You are building an iOS app that needs Firebase Authentication and Firestore. Run the bundled Swift script with the Firebase repo URL, latest SDK version, and your plist path, and the project is configured without opening Xcode's package UI. ## Quick Start Ask the AI to add the Firebase iOS SDK with FirebaseAuth and FirebaseFirestore to your Xcode project using this skill's Swift setup script.

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 with Swift Package Manager?▼

Run the bundled xcode_spm_setup Swift script with the firebase-ios-sdk repository URL, the latest release version, and the product modules you need such as FirebaseAuth and FirebaseFirestore. The script adds the package dependency and links the modules to your target automatically.

How to link GoogleService-Info.plist to an Xcode project automatically?▼

Pass the plist path with the --plist flag when running the xcode_spm_setup script. It links GoogleService-Info.plist into the resources build phase of your project, and the operation is idempotent so already-linked files are skipped.

Why does Firebase crash with 'Unexpectedly found nil' at runtime on iOS?▼

The Apple linker strips Objective-C categories and +load methods from statically linked Firebase frameworks. Adding the -ObjC flag to OTHER_LDFLAGS fixes this, and the setup script injects it automatically when adding Firebase products.

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

This workflow strictly forbids Ruby and the xcodeproj gem. All project manipulation is done through a native Swift script, with Node.js or TypeScript permitted only as a last resort if Swift is unviable.

What happens if no Xcode project exists in the directory?▼

The workflow stops and asks you to create an empty Xcode project manually first. Once the .xcodeproj exists, the standard SPM setup workflow can proceed.