Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

xcode

/xcode

Wspiera pracę w Xcode: Swift i SwiftUI, symulatory iOS i macOS, Xcode Cloud, profilowanie Instruments, Swift Package Manager, debugowanie LLDB i podpisywanie.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wspiera pracę w Xcode: Swift i SwiftUI, symulatory iOS i macOS, Xcode Cloud, profilowanie Instruments, Swift Package Manager, debugowanie LLDB i podpisywanie.

Oryginalny opis (EN)

Expert Xcode assistance covering Swift/SwiftUI development, iOS/macOS simulators, Xcode Cloud CI/CD, Instruments profiling, and Swift Package Manager (SPM). Use when configuring Xcode projects, debugging iOS apps with LLDB, profiling with Instruments, or managing Apple Developer signing.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 163 linii, 642 słów
Podgląd SKILL.md
---
name: xcode
description: Expert Xcode assistance covering Swift/SwiftUI development, iOS/macOS simulators, Xcode Cloud CI/CD, Instruments profiling, and Swift Package Manager (SPM). Use when configuring Xcode projects, debugging iOS apps with LLDB, profiling with Instruments, or managing Apple Developer signing.
---

# Xcode

Xcode is Apple's unified IDE for developing software across iOS, iPadOS, macOS, watchOS, and visionOS, featuring Instruments profiling, LLDB debugging, and Swift Package Manager.

## When to Use

- **Native Apple Platform Engineering**: Building iOS, iPadOS, macOS, watchOS, and visionOS applications using Swift and SwiftUI.
- **Instruments Performance Profiling**: Profiling memory leaks, CPU spikes, energy usage, and Time Profiler traces.
- **Automated CI/CD Build Packaging**: Building, signing, and releasing apps to TestFlight using Fastlane and `xcodebuild`.
- **Swift Package Manager (SPM) Dependency Resolution**: Managing native modular libraries and cross-platform Swift packages.

## Quick Start

### 1. Build and Test via xcodebuild CLI

```bash
# Build for iOS Simulator
xcodebuild -scheme MyApp \
  -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
  clean build

# Run unit tests
xcodebuild test -scheme MyApp \
  -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest'
```

### 2. Core Xcode Shortcuts

- `Cmd + B`: Build
- `Cmd + R`: Run
- `Cmd + U`: Run Unit Tests
- `Cmd + .`: Stop Running
- `Cmd + Shift + O`: Open Quickly (search symbol or file)

## Core Concepts

### Modular Swift Package Architecture (`Package.swift`)

Defining modular application packages with explicit dependencies and targets:

```swift
// swift-tools-version: 5.10
import PackageDescription

let package = Package(
    name: "CoreNetworking",
    platforms: [
        .iOS(.v17),
        .macOS(.v14)
    ],
    products: [
        .library(name: "CoreNetworking", targets: ["CoreNetworking"]),
    ],
    dependencies: [
        .package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.9.0"),
    ],
    targets: [
        .target(
            name: "CoreNetworking",
            dependencies: ["Alamofire"],
            swiftSettings: [
                .enableExperimentalFeature("StrictConcurrency")
            ]
        ),
        .testTarget(
            name: "CoreNetworkingTests",
            dependencies: ["CoreNetworking"]
        ),
    ]
)
```

### Automated CI/CD Build & Test with `xcodebuild`

Executing headless builds and test runs in continuous integration:

```bash
# Clean, build, and test application for iOS Simulator
xcodebuild clean test \
  -workspace "EnterpriseApp.xcworkspace" \
  -scheme "EnterpriseApp" \
  -destination "platform=iOS Simulator,name=iPhone 16 Pro,OS=latest" \
  -resultBundlePath "./build/TestResults.xcresult" \
  CODE_SIGN_IDENTITY="" \
  CODE_SIGNING_REQUIRED=NO \
  CODE_SIGNING_ALLOWED=NO
```

### Declarative Build Settings (`Config.xcconfig`)

Extracting signing, bundle identifiers, and compiler flags from `.xcodeproj` into versioned files:

```ini
// Release.xcconfig
PRODUCT_BUNDLE_IDENTIFIER = com.company.enterpriseapp
SWIFT_VERSION = 5.10
SWIFT_STRICT_CONCURRENCY = complete
IPHONEOS_DEPLOYMENT_TARGET = 17.0
ENABLE_BITCODE = NO
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
SWIFT_OPTIMIZATION_LEVEL = -O
```

## Common Patterns

### LLDB Debugging Commands

**Problem**: Inspect memory, modify variables at runtime, and view view-hierarchy during breakpoints.  
**Solution**: Use LLDB console commands.

```lldb
# Print object description
po myViewModel.userProfile

# Print view hierarchy
po [[UIWindow keyWindow] recursiveDescription]

# Modify variable in memory during breakpoint
expr isFeatureFlagEnabled = true

# Continue execution
c
```

### Instruments Memory Leak Profiling

**Problem**: Identifying retain cycles and memory leaks in SwiftUI and UIKit navigation flows.

**Solution**:

```bash
# Run Leaks instrument on application bundle from command line
xcrun xctrace record   --template "Leaks"   --device "iPhone 15 Pro"   --launch -- com.example.MyApp   --output ./build/MyAppLeaks.trace
```

## Best Practices

**Do**:

- Enable **Complete Strict Concurrency Checking** (`SWIFT_STRICT_CONCURRENCY = complete`) for Swift 6 safety.
- Manage build configuration flags using `.xcconfig` files rather than modifying `.xcodeproj` project files directly.
- Profile memory leaks, retain cycles, and allocation graphs using **Xcode Instruments** (`Cmd + I`).
- Automate archiving and TestFlight distribution using `fastlane gym` and `fastlane pilot`.

**Don't**:

- Commit `xcuserdata/` directories inside `.xcodeproj` or `.xcworkspace` to Git.
- Store private distribution certificates or provisioning profile passwords in plaintext CI scripts.
- Force-unwrap optionals (`!`) or ignore Swift Concurrency compiler warnings.

## Troubleshooting

| Error                                               | Cause                                                                       | Solution                                                                                              |
| --------------------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `Code Signing Error: No signing certificate found`  | Apple Developer account credentials expired or provisioning profile missing | Check **Signing & Capabilities** tab; select your team and enable **Automatically manage signing**.   |
| DerivedData corruption causing phantom build errors | Stale module cache or build artifacts                                       | Run `rm -rf ~/Library/Developer/Xcode/DerivedData` and restart Xcode.                                 |
| Simulator fails to boot or hangs on black screen    | Corrupted simulator state                                                   | Open Simulator menu > **Device > Erase All Content and Settings...** or run `xcrun simctl erase all`. |

## References

- [Xcode Documentation](https://developer.apple.com/xcode/)

Wersje

W bazie nie ma innych skilli o nazwie xcode.

Migawka bazy z 13.11.2026 · wersja paczki 97166cf53f60 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90apple-developer
    Buduje, debuguje i przegląda natywne aplikacje macOS, iPadOS i iOS w Swift, SwiftUI, UIKit i Xcode, także przy wysyłce do App Store.
  • 95ios-skills-router
    Kieruje pracę nad projektami iOS, macOS, Swift i Xcode do właściwych wyspecjalizowanych skilli według fazy i kontekstu zadania, spośród 210 skilli od 28 autorów.
  • 100lldb
    Pomaga debugować w LLDB na macOS, FreeBSD lub Linuksie z clang: odpowiedniki poleceń GDB, integracja z Xcode i VS Code, skrypty Python oraz debugowanie Swift i Objective-C.
  • 100ios-swift-expert
    Wspiera tworzenie aplikacji iOS i macOS w Swift: widoki SwiftUI i kontrolery UIKit, błędy budowania w Xcode, Core Data, architektura aplikacji i optymalizacja wydajności.
  • 95preview-build
    Buduje podglądy SwiftUI i robi zrzuty symulatora, żeby ocenić wygląd interfejsu iOS w projektach Xcode, pakietach SPM lub plikach Swift.
  • 100macos-apps
    Buduje natywne aplikacje macOS w Swift ze SwiftUI i AppKit, obejmując budowanie, debugowanie, testy, optymalizację i wydanie, wyłącznie z wiersza poleceń bez Xcode.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.