xcode-project-setup
Safely add Swift Package dependencies and link configuration files to Xcode projects without manual .pbxproj editing.
- Automates both package repository registration and target linking in a single command, eliminating manual Xcode UI steps
- Handles Firebase setup automatically, including injection of the
-ObjClinker flag required to prevent runtime crashes from stripped Objective-C categories - Supports optional configuration file linking (e.g.,
GoogleService-Info.plist) via the--plistflag - Idempotent design skips re-linking already-present packages and files; requires Swift toolchain and macOS environment
Xcode Project Setup
⛔️ CRITICAL RULES & ENVIRONMENT CHECKS
Before performing any Xcode setup or file manipulation, you MUST adhere to the following rules. A hefty fee will be applied if you violate them.
1. The Anti-Ruby Mandate
You are strictly forbidden from using Ruby, Rails, or any Ruby gems (including the xcodeproj gem). Under no circumstances may you write or execute Ruby scripts.
2. Modern Xcode Folder Synchronization
Modern Xcode projects support folder synchronization. When adding new source code (.swift) or resource files, simply write them to the correct directory on disk. They will be automatically included in the Xcode project. Never manually modify the .pbxproj file to add files.
3. Allowed Scripting Languages
If you absolutely must write a script to manipulate the project environment (e.g., configuring SPM packages beyond what the provided xcode_spm_setup script does), you must use Swift. Only as an absolute last resort, if Swift is completely unviable, may you use Node.js or TypeScript.
4. Toolchain Verification
Because this skill relies entirely on a native Swift script, you must verify the environment:
- Run
swift --versionbefore proceeding. - If the Swift command is not found, you must stop and recommend the user install the Swift toolchain (e.g., via
xcode-select --installon macOS), or ask if you can attempt to install it for them. Do not attempt to proceed without Swift.
Explore more of GLSRM
