xcode-project-setup

tarafından firebase

Xcode projelerini (.pbxproj) güvenle değiştirerek Swift Paketleri ekler ve dosyaları bağlar. Bir iOS projesinin bağımlılık yüklemesi gerektiğinde (ör.…) bu beceriyi kullanın.

npx skills add https://github.com/firebase/agent-skills --skill xcode-project-setup

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 --version before proceeding.
  • If the Swift command is not found, you must stop and recommend the user install the Swift toolchain (e.g., via xcode-select --install on macOS), or ask if you can attempt to install it for them. Do not attempt to proceed without Swift.

5. Mandatory Linker Flags for Static Frameworks (Firebase)

When setting up SPM dependencies that heavily rely on internal Objective-C categories and +load methods (such as the Firebase iOS SDK suite), the Apple linker will aggressively strip these methods out if they are linked statically.

This causes fatal runtime crashes (e.g., FirebaseAuth/Auth.swift:167: Fatal error: Unexpectedly found nil).

The provided xcode_spm_setup Swift script automatically injects the -ObjC flag to OTHER_LDFLAGS when adding Firebase products. However, you should still verify it is present in the build settings if you encounter issues.

  • Failing to include this flag when adding Firebase dependencies is a critical error.

Empty Directory Workflow

If you are asked to build an iOS app or configure Xcode dependencies but no .xcodeproj or .xcworkspace exists, you MUST ask the user to create the project first:

"No Xcode project found in this directory. Please create an empty Xcode project manually and let me know when you are ready to proceed."

Wait for the user to confirm they have created the .xcodeproj via Xcode, then proceed with the Standard Xcode Workflow below.


Standard Xcode Workflow

Do not use raw text parsing, sed, or Ruby scripts to modify .pbxproj files directly.

Instead, execute the Swift configuration package bundled with this skill (scripts/xcode_spm_setup) to securely install SPM packages and link optional config files (like GoogleService-Info.plist).

CRITICAL: Always Use Latest SDK Version

To ensure access to the latest features and security fixes, always use the most recent version of the Firebase iOS SDK. Check for the latest release version at https://github.com/firebase/firebase-ios-sdk/releases.

  • Use the most recent version number (e.g., 11.x.y) in your commands instead of hardcoded placeholders.

Understanding the Script's Actions

When adding a Swift Package to an Xcode project, two distinct steps must occur:

  1. Adding the package repository dependency (e.g., https://github.com/Alamofire/Alamofire).
  2. Selecting the target (e.g., MyApp), navigating to General > Frameworks, Libraries, and Embedded Content, and hitting the + button to explicitly link the specific product modules (e.g., Alamofire).

The provided xcode_spm_setup Swift script automatically handles BOTH of these steps for you. By passing the list of modules as arguments, it safely injects the package dependency and automatically wires those modules to the main target's Frameworks build phase. You do not need to do any manual linking.

Usage

  1. Locate the package path: Find the absolute path to this skill's scripts/xcode_spm_setup directory on disk.
  2. Execute: Run the native swift run command using the signature below:
swift run --package-path <PATH_TO_SKILL>/scripts/xcode_spm_setup xcode_spm_setup <ProjectPath.xcodeproj> <RepoURL> <VersionRequirement> [--plist <Optional/Path/To/Config.plist>] <Product1> [Product2 ...]

Example 1: Generic Package (e.g., Alamofire)

Adding Alamofire to a standard Xcode project. Notice there is no --plist flag.

swift run --package-path /Users/foo/.agents/skills/xcode-project-setup/scripts/xcode_spm_setup xcode_spm_setup MyApp.xcodeproj https://github.com/Alamofire/Alamofire 5.8.1 Alamofire

Example 2: Firebase (Requires Plist)

Adding Firebase and linking the GoogleService-Info.plist to the resources build phase automatically. Note: Replace 11.0.0 with the actual latest version from the releases page.

swift run --package-path /Users/foo/.agents/skills/xcode-project-setup/scripts/xcode_spm_setup xcode_spm_setup MyApp.xcodeproj https://github.com/firebase/firebase-ios-sdk 11.0.0 --plist MyApp/GoogleService-Info.plist FirebaseCore FirebaseAuth FirebaseFirestore

Note: The script is idempotent. It will automatically skip linking files or packages that are already present in the project.

firebase tarafından daha fazla skill

firebase-remote-config-basics
firebase
Firebase Remote Config için kapsamlı rehber; şablon yönetimi ve SDK kullanımını içerir. Kullanıcının Remote Config kurulumu, özellik bayraklarını yönetme veya uygulama davranışını dinamik olarak güncelleme konusunda yardıma ihtiyacı olduğunda bu beceriyi kullanın.
officialdevelopmentapi
developing-genkit-dart
firebase
We need to translate the given text from English to Turkish, preserving the name "developing-genkit-dart" if it appears, but it does not appear in the text. The text describes a unified AI SDK for Dart. We must not add any extra commentary, labels, or formatting. Just the translation. The text: "Unified AI SDK for Dart enabling code generation, structured outputs, tools, flows, and agents. Provides core APIs for generation, tool definition, flow orchestration, embeddings, and streaming with a single interface Includes 8+ plugins for LLM providers (Google Gemini, Anthropic Claude, OpenAI GPT), Firebase AI, Model Context Protocol, Chrome browser integration, and HTTP server hosting via Shelf Built-in CLI with local development UI for flow execution, tracing, model experimentation, and..." We need to translate accurately, preserving product names, protocol names, URLs, numbers, technical terms. So "Unified AI SDK for Dart" -> "Dart için Birleşik AI SDK'sı" but careful: "AI" is technical term, keep as AI.
official
developing-genkit-go
firebase
Go ile Genkit kullanarak yapay zeka destekli uygulamalar geliştirin. Kullanıcı Go'da Genkit ile AI özellikleri, ajanlar, akışlar veya araçlar oluşturmayı istediğinde veya bunlarla çalışırken kullanın.
official
developing-genkit-js
firebase
Genkit akışları, araçları ve çoklu model desteği ile AI destekli Node.js/TypeScript uygulamaları oluşturun. Genkit, sağlayıcıdan bağımsızdır; eklentiler aracılığıyla Google AI, OpenAI, Anthropic, Ollama ve diğer LLM sağlayıcılarını destekler. Zod ile tür güvenli şemalar kullanarak akışlar tanımlayın, üretim isteklerini yürütün ve TypeScript'te çok adımlı AI iş akışları oluşturun. Genkit CLI v1.29.0+ gerektirir; son büyük API değişiklikleri nedeniyle güncel kalıplar için önceki bilgilere değil, genkit docs:read ve common-errors.md dosyasına başvurmalısınız...
official
developing-genkit-python
firebase
Genkit kullanarak Python'da yapay zeka destekli uygulamalar geliştirin. Kullanıcı Python'da Genkit, AI ajanları, akışlar veya araçlar hakkında soru sorduğunda veya Genkit ile karşılaştığında kullanın…
official
firebase-ai-logic
firebase
We need to translate the given English text into Turkish, preserving the name "firebase-ai-logic" only if it appears in the source text. The source text does not contain that name; it's just the directory item type. So we translate the description only. The text is about client-side Gemini integration for web apps. We must preserve product names (Gemini, Gemini Nano, Chrome, Cloud Storage, App Check), protocol names, URLs (none), numbers (20 MB), and technical terms (multimodal inference, streaming, on-device hybrid execution, etc.). No extra commentary, no labels. Just the translation. Let's translate carefully: "Client-side Gemini integration for web apps with multimodal inference, streaming, and on-device hybrid execution." -> "Web uygulamaları için çok modlu çıkarım, akış ve cihaz üzerinde hibrit yürütme ile istemci tarafı Gemini entegrasyonu." "Supports text-only and multimodal inputs (images, audio, video, PDFs);
official
firebase-ai-logic-basics
firebase
Firebase AI Logic (Gemini API)'yi web uygulamalarına entegre etmek için resmi beceri. Kurulum, çok modlu çıkarım, yapılandırılmış çıktı ve güvenlik konularını kapsar.
official
firebase-app-hosting-basics
firebase
Firebase App Hosting ile Next.js, Angular ve diğer desteklenen framework'leri kullanarak full-stack web uygulamaları dağıtın ve yönetin. Blaze fiyatlandırma planında bir Firebase projesi gerektirir; Sunucu Taraflı Render (SSR) ve Artımlı Statik Rejenerasyon (ISR) iş akışlarını destekler. Firebase.json yapılandırması ve isteğe bağlı apphosting.yaml ile backend kurulumu yaparak dağıtım yapın veya GitHub entegrasyonu aracılığıyla otomatik "git push ile dağıt" özelliğini etkinleştirin. Hassas anahtarlara güvenli erişim için CLI komutlarıyla gizli yönetimi içerir...
official