[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DPYB89HT1RZ1AJFXQ7F8NN":3,"skill-same:01M7DPYB89HT1RZ1AJFXQ7F8NN":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":46},"01M7DPYB89HT1RZ1AJFXQ7F8NN","sentry-cocoa-sdk",null,"Full Sentry SDK setup for Apple platforms (iOS, macOS, tvOS, watchOS, visionOS). Use when asked to \"add Sentry to iOS\", \"add Sentry to Swift\", \"install sentry-cocoa\", or configure error monitoring, tracing, profiling, session replay, logging, or metrics for Apple applications. Supports SwiftUI and UIKit.","Hazek-dc\u002FPresensiGuru_FaceNet_EMAR","Hazek-dc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F75208960?v=4","01M7DEQV5B4YGS86A81DYH81DR","Hazek","01M7DEQV5XP4TM0C6NTHXCXCHR",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sentry-cocoa-sdk\ndescription: Full Sentry SDK setup for Apple platforms (iOS, macOS, tvOS, watchOS, visionOS). Use when asked to \"add Sentry to iOS\", \"add Sentry to Swift\", \"install sentry-cocoa\", or configure error monitoring, tracing, profiling, session replay, logging, or metrics for Apple applications. Supports SwiftUI and UIKit.\nlicense: Apache-2.0\ncategory: sdk-setup\nparent: sentry-sdk-setup\ndisable-model-invocation: true\n---\n\n> [All Skills](..\u002F..\u002FSKILL_TREE.md) > [SDK Setup](..\u002Fsentry-sdk-setup\u002FSKILL.md) > Cocoa SDK\n\n# Sentry Cocoa SDK\n\nOpinionated wizard that scans your Apple project and guides you through complete Sentry setup.\n\n## Invoke This Skill When\n\n- User asks to \"add Sentry to iOS\u002FmacOS\u002FtvOS\" or \"set up Sentry\" in an Apple app\n- User wants error monitoring, tracing, profiling, session replay, or logging in Swift\u002FObjC, or metrics in Swift\n- User mentions `sentry-cocoa`, `SentrySDK`, or the Apple\u002FiOS Sentry SDK\n- User wants to monitor crashes, app hangs, watchdog terminations, or performance\n\n> **Note:** SDK versions and APIs below reflect Sentry docs at time of writing (sentry-cocoa 9.15.0).\n> Always verify against [docs.sentry.io\u002Fplatforms\u002Fapple\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fapple\u002F) before implementing.\n\n---\n\n## Phase 1: Detect\n\nRun these commands to understand the project before making any recommendations:\n\n```bash\n# Check existing Sentry dependency\ngrep -rEi \"sentry|sentry-cocoa|SentrySPM|SentrySwiftUI\" \\\n  --include=\"Package.swift\" --include=\"Podfile\" --include=\"Cartfile\" \\\n  --include=\"Package.resolved\" --include=\"project.pbxproj\" . 2>\u002Fdev\u002Fnull | head -20\n\n# Detect UI framework (SwiftUI vs UIKit)\ngrep -rE \"@main|struct .*: App\" --include=\"*.swift\" . 2>\u002Fdev\u002Fnull | head -5\ngrep -rE \"AppDelegate|UIApplicationMain|@UIApplicationDelegateAdaptor\" --include=\"*.swift\" . 2>\u002Fdev\u002Fnull | head -5\n\n# Detect platform and deployment targets\ngrep -rE \"platforms:|\\\\.iOS|\\\\.macOS|\\\\.tvOS|\\\\.watchOS|\\\\.visionOS|IPHONEOS_DEPLOYMENT_TARGET|MACOSX_DEPLOYMENT_TARGET|TVOS_DEPLOYMENT_TARGET|WATCHOS_DEPLOYMENT_TARGET|XROS_DEPLOYMENT_TARGET\" \\\n  --include=\"Package.swift\" --include=\"project.pbxproj\" . 2>\u002Fdev\u002Fnull | head -20\ngrep -E \"platform :ios|platform :osx|platform :tvos|platform :watchos\" Podfile 2>\u002Fdev\u002Fnull\n\n# Detect logging\ngrep -rE \"import OSLog|import os\\\\.log|Logger\\\\(|CocoaLumberjack|DDLog\" --include=\"*.swift\" . 2>\u002Fdev\u002Fnull | head -5\n\n# Detect companion backend\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\nls ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002FGemfile ..\u002Fpackage.json 2>\u002Fdev\u002Fnull\n```\n\n**What to note:**\n- Is `sentry-cocoa` already in `Package.swift` or `Podfile`? If yes, skip to Phase 2 (configure features).\n- SwiftUI (`@main App` struct) or UIKit (`AppDelegate`)? Determines init pattern.\n- Which Apple platforms? (Affects which features are available — see Platform Support Matrix.)\n- Existing logging library? (Enables structured log capture.)\n- SwiftUI tracing import\u002Fproduct? `SentrySwiftUI` still exists but is deprecated in SDK 9.4.1+; prefer the main `Sentry` module for released binary products.\n- Companion backend? (Triggers Phase 4 cross-link for distributed tracing.)\n\n---\n\n## Phase 2: Recommend\n\nBased on what you found, present a concrete recommendation. Don't ask open-ended questions — lead with a proposal:\n\n**Recommended (core coverage):**\n- **Error Monitoring** — always; crash reporting, app hangs, watchdog terminations, NSError\u002FSwift errors\n- **Tracing** — always for apps; auto-instruments app launch, network, UIViewController, file I\u002FO, Core Data\n- **Profiling** — production iOS\u002FmacOS apps; UI profiling via `configureProfiling`\n\n**Optional (enhanced observability):**\n- **Session Replay** — user-facing iOS apps; verify masking on iOS 26+ \u002F Liquid Glass builds\n- **Logging** — when structured log capture is needed\n- **Metrics** — Swift apps needing aggregate counters, gauges, or distributions\n- **User Feedback** — apps that want crash\u002Ferror feedback forms from users\n\n**Not available for Cocoa:**\n- Crons — backend only\n- AI Monitoring — JS\u002FPython only\n\n**Recommendation logic:**\n\n| Feature | Recommend when... |\n|---------|------------------|\n| Error Monitoring | **Always** — non-negotiable baseline |\n| Tracing | **Always for apps** — rich auto-instrumentation out of the box |\n| Profiling | iOS\u002FmacOS production apps where performance matters (not tvOS\u002FwatchOS\u002FvisionOS) |\n| Session Replay | User-facing iOS apps; tvOS may work but is not officially supported |\n| Logging | Existing `os.log` \u002F CocoaLumberjack usage, or structured logs needed |\n| Metrics | Aggregate product or health signals that should not create issues; Swift only, SDK 9.12+ |\n| User Feedback | Apps wanting in-app bug reports with screenshots |\n\nPropose: *\"I recommend Error Monitoring + Tracing + Profiling. Want me to also add Session Replay and Logging?\"*\n\n---\n\n## Phase 3: Guide\n\n### Install\n\n**Option 1 — Sentry Wizard (recommended):**\n\n> **You need to run this yourself** — the wizard opens a browser for login and requires interactive input that the agent can't handle. Copy-paste into your terminal:\n>\n> ```\n> brew install getsentry\u002Ftools\u002Fsentry-wizard && sentry-wizard -i ios\n> ```\n>\n> It handles login, org\u002Fproject selection, auth token setup, SDK installation, AppDelegate updates, and dSYM\u002Fdebug symbol upload build phases.\n>\n> **Once it finishes, come back and skip to [Verification](#verification).**\n\nIf the user skips the wizard, proceed with Option 2 (SPM\u002FCocoaPods) and manual setup below.\n\n**Option 2 — Swift Package Manager:** File → Add Packages → enter:\n```\nhttps:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa.git\n```\n\nOr in `Package.swift`:\n```swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\", from: \"9.15.0\"),\n```\n\n**SPM Products** — choose **exactly one** per target:\n\n| Product | Use Case |\n|---------|----------|\n| `Sentry` | **Recommended** — static framework, fast app start; includes SwiftUI APIs in SDK 9.4.1+ |\n| `Sentry-Dynamic` | Dynamic framework alternative |\n| `SentrySwiftUI` | Legacy\u002Fdeprecated re-export for SwiftUI APIs; use only when maintaining older setup |\n| `Sentry-WithoutUIKitOrAppKit` | watchOS, app extensions, CLI tools (Swift \u003C 6.1) |\n| `SentrySPM` + `NoUIFramework` trait | Source build without UIKit\u002FAppKit for CLI\u002Fheadless targets (**SDK 9.7+ \u002F Swift 6.1+ \u002F Xcode 26.4+** for Xcode UI) |\n\n> Warning: Xcode allows selecting multiple products — choose only one.\n>\n> If using `SentrySPM` from source, current source-build projects may import `SentrySwift` instead of `Sentry`; verify the module name in the target. Released binary products use `import Sentry`.\n\n**Swift 6.1+ trait-based opt-out of UIKit\u002FAppKit** (requires `Package@swift-6.1.swift` manifest):\n\n```swift\n\u002F\u002F Package.swift (Swift 6.1+)\n.package(\n    url: \"https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\",\n    from: \"9.15.0\",\n    traits: [\"NoUIFramework\"]\n),\n\n\u002F\u002F In your target's dependencies:\n.product(name: \"SentrySPM\", package: \"sentry-cocoa\")\n```\n\nThis is the preferred opt-out path for command-line\u002Fheadless targets on Swift 6.1+. It compiles the SDK from source so the trait can remove UIKit\u002FAppKit\u002FSwiftUI linkage. For Swift \u003C 6.1 continue using `Sentry-WithoutUIKitOrAppKit`.\n\n> **Note:** Package traits are visible in the Xcode UI starting with **Xcode 26.4+**. On older Xcode versions, traits still work when declared in `Package.swift` but won't appear in the GUI.\n\n**Option 3 — CocoaPods (deprecated; prefer SPM):**\n```ruby\nplatform :ios, '15.0'\nuse_frameworks!\n\ntarget 'YourApp' do\n  pod 'Sentry', :git => 'https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa.git', :tag => '9.15.0'\nend\n```\n\nSentry plans to stop publishing CocoaPods releases at the end of June 2026; use this only for existing CocoaPods projects.\n\n> **Known issue (Xcode 14+):** Sandbox `rsync.samba` error → Target Settings → \"Enable User Script Sandbox\" → `NO`.\n\n**Option 4 — SentryObjC (for pure Objective-C\u002FC++ projects):**\n\nFor pure Objective-C or Objective-C++ projects that **cannot enable Clang modules** (e.g., `-fmodules=NO`), use the SentryObjC wrapper SDK. It provides the same functionality as the main SDK but with pure Objective-C headers that don't require Swift module imports.\n\n**SPM:**\n```swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\", from: \"9.17.1\"),\n\n\u002F\u002F In your target's dependencies:\n.product(name: \"SentryObjC\", package: \"sentry-cocoa\")\n```\n\nOr download `SentryObjC-Dynamic.xcframework.zip` from the [releases page](https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\u002Freleases).\n\n**Migration from regular Sentry to SentryObjC:**\n- Change `#import \u003CSentry\u002FSentry.h>` to `#import \u003CSentryObjC\u002FSentryObjC.h>`\n- Rename `Sentry`-prefixed types to `SentryObjC` (e.g., `SentrySDK` → `SentryObjCSDK`, `SentryOptions` → `SentryObjCOptions`)\n- The API surface is otherwise identical\n\nMost users should use the standard `Sentry` product (Option 2). Only use `SentryObjC` if you have a specific requirement preventing Clang modules.\n\n---\n\n### Quick Start — Recommended Init\n\nFull iOS app config enabling the most common features with sensible defaults. Add before any other code at app startup.\n\nFor macOS, watchOS, app extensions, or `NoUIFramework` builds, omit options that are unavailable for that platform (`sessionReplay`, screenshots\u002Fview hierarchy, user-feedback UI, UIKit tracing, and profiling on tvOS\u002FwatchOS\u002FvisionOS). Keep the core `dsn`, environment, error monitoring, tracing, logs, and metrics settings that compile for the detected target.\n\n**SwiftUI — App entry point:**\n```swift\nimport SwiftUI\nimport Sentry\n\n@main\nstruct MyApp: App {\n    init() {\n        SentrySDK.start { options in\n            options.dsn = ProcessInfo.processInfo.environment[\"SENTRY_DSN\"]\n                ?? \"https:\u002F\u002FexamplePublicKey@o0.ingest.sentry.io\u002F0\"\n            options.environment = ProcessInfo.processInfo.environment[\"SENTRY_ENVIRONMENT\"]\n                ?? \"production\"\n            \u002F\u002F releaseName defaults to \"\u003Cbundle id>@\u003Cversion>+\u003Cbuild>\"; set only if you need a custom release.\n\n            \u002F\u002F Error monitoring (on by default — explicit for clarity)\n            options.enableCrashHandler = true\n            options.enableAppHangTracking = true\n            options.enableReportNonFullyBlockingAppHangs = true\n            options.enableWatchdogTerminationTracking = true\n            options.attachScreenshot = true\n            options.attachViewHierarchy = true\n            options.sendDefaultPii = true\n\n            \u002F\u002F Tracing\n            options.tracesSampleRate = 1.0          \u002F\u002F lower to 0.2 in high-traffic production\n\n            \u002F\u002F Profiling (SDK 9.0.0+ API)\n            options.configureProfiling = {\n                $0.sessionSampleRate = 1.0\n                $0.lifecycle = .trace\n            }\n\n            \u002F\u002F Session Replay. Keep production sampling conservative and verify masking on iOS 26+.\n            options.sessionReplay.sessionSampleRate = 0.1\n            options.sessionReplay.onErrorSampleRate = 1.0\n\n            \u002F\u002F Logging (SDK 9.0.0+ top-level; use options.experimental.enableLogs in 8.x)\n            options.enableLogs = true\n\n            \u002F\u002F Metrics are enabled by default in SDK 9.12+. Set false only to opt out.\n            options.enableMetrics = true\n        }\n    }\n\n    var body: some Scene {\n        WindowGroup { ContentView() }\n    }\n}\n```\n\n**UIKit — AppDelegate:**\n```swift\nimport UIKit\nimport Sentry\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n    func application(\n        _ application: UIApplication,\n        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n    ) -> Bool {\n        SentrySDK.start { options in\n            options.dsn = ProcessInfo.processInfo.environment[\"SENTRY_DSN\"]\n                ?? \"https:\u002F\u002FexamplePublicKey@o0.ingest.sentry.io\u002F0\"\n            options.environment = ProcessInfo.processInfo.environment[\"SENTRY_ENVIRONMENT\"]\n                ?? \"production\"\n            \u002F\u002F releaseName defaults to \"\u003Cbundle id>@\u003Cversion>+\u003Cbuild>\"; set only if you need a custom release.\n\n            options.enableCrashHandler = true\n            options.enableAppHangTracking = true\n            options.enableReportNonFullyBlockingAppHangs = true\n            options.enableWatchdogTerminationTracking = true\n            options.attachScreenshot = true\n            options.attachViewHierarchy = true\n            options.sendDefaultPii = true\n\n            options.tracesSampleRate = 1.0\n\n            options.configureProfiling = {\n                $0.sessionSampleRate = 1.0\n                $0.lifecycle = .trace\n            }\n\n            options.sessionReplay.sessionSampleRate = 0.1\n            options.sessionReplay.onErrorSampleRate = 1.0\n\n            \u002F\u002F Logging (SDK 9.0.0+ top-level; use options.experimental.enableLogs in 8.x)\n            options.enableLogs = true\n\n            \u002F\u002F Metrics are enabled by default in SDK 9.12+. Set false only to opt out.\n            options.enableMetrics = true\n        }\n        return true\n    }\n}\n```\n\n> Warning: SDK initialization must occur on the **main thread**.\n\n---\n\n### For Each Agreed Feature\n\nWalk through features one at a time. Load the reference file for each, follow its steps, and verify before moving to the next:\n\n| Feature | Reference file | Load when... |\n|---------|---------------|-------------|\n| Error Monitoring | `${SKILL_ROOT}\u002Freferences\u002Ferror-monitoring.md` | Always (baseline) |\n| Tracing | `${SKILL_ROOT}\u002Freferences\u002Ftracing.md` | App launch, network, UIViewController perf |\n| Profiling | `${SKILL_ROOT}\u002Freferences\u002Fprofiling.md` | Production perf-sensitive apps |\n| Session Replay | `${SKILL_ROOT}\u002Freferences\u002Fsession-replay.md` | User-facing iOS apps; tvOS only with caveat |\n| Logging | `${SKILL_ROOT}\u002Freferences\u002Flogging.md` | Structured log capture needed |\n| Metrics | `${SKILL_ROOT}\u002Freferences\u002Fmetrics.md` | Aggregate counters, gauges, distributions |\n| User Feedback | `${SKILL_ROOT}\u002Freferences\u002Fuser-feedback.md` | In-app bug reporting wanted |\n\nFor each feature: `Read ${SKILL_ROOT}\u002Freferences\u002F\u003Cfeature>.md`, follow steps exactly, verify it works.\n\n---\n\n## Configuration Reference\n\n### Key `SentryOptions` Fields\n\n| Option | Type | Default | Purpose |\n|--------|------|---------|---------|\n| `dsn` | `String?` | `nil` | SDK disabled if empty; macOS can read `SENTRY_DSN`, other Apple platforms must set explicitly |\n| `environment` | `String` | `\"production\"` | e.g., `\"production\"` |\n| `releaseName` | `String?` | bundle-derived | Defaults to `\u003Cbundle id>@\u003Cversion>+\u003Cbuild>` |\n| `debug` | `Bool` | `false` | Verbose SDK output — **disable in production** |\n| `sendDefaultPii` | `Bool` | `false` | Include IP, user info from active integrations |\n| `enableCrashHandler` | `Bool` | `true` | Master switch for crash reporting |\n| `enableAppHangTracking` | `Bool` | `true` | Master switch for app hang tracking |\n| `enableReportNonFullyBlockingAppHangs` | `Bool` | `true` | Report non-fully-blocking hangs on supported UI platforms |\n| `appHangTimeoutInterval` | `Double` | `2.0` | Seconds before classifying as hang |\n| `enableWatchdogTerminationTracking` | `Bool` | `true` | Track watchdog kills (iOS, tvOS, Mac Catalyst) |\n| `attachScreenshot` | `Bool` | `false` | Capture screenshot on error |\n| `attachViewHierarchy` | `Bool` | `false` | Capture view hierarchy on error |\n| `tracesSampleRate` | `NSNumber?` | `nil` | Transaction sample rate (`nil` = tracing disabled); Swift auto-boxes `Double` literals (e.g. `1.0` → `NSNumber`) |\n| `tracesSampler` | `Closure` | `nil` | Dynamic per-transaction sampling (overrides rate) |\n| `enableAutoPerformanceTracing` | `Bool` | `true` | Master switch for auto-instrumentation |\n| `tracePropagationTargets` | `[Any]` | all requests | Strings or `NSRegularExpression` values that receive distributed trace headers |\n| `enableCaptureFailedRequests` | `Bool` | `true` | Auto-capture HTTP 5xx errors as events |\n| `enableNetworkBreadcrumbs` | `Bool` | `true` | Breadcrumbs for outgoing HTTP requests |\n| `add(inAppInclude:)` | Method | bundle executable | Add module prefixes treated as \"in-app\" code |\n| `maxBreadcrumbs` | `Int` | `100` | Max breadcrumbs per event |\n| `sampleRate` | `Float` | `1.0` | Error event sample rate |\n| `beforeSend` | `Closure` | `nil` | Hook to mutate\u002Fdrop error events |\n| `onLastRunStatusDetermined` | `Closure` | `nil` | Called after SDK determines previous launch crash status |\n| `strictTraceContinuation` | `Bool` | `false` | Reject incoming traces from other orgs; validates `sentry-org_id` in baggage headers (sentry-cocoa ≥9.10.0) |\n| `orgId` | `String?` | `nil` | Organization ID for strict trace validation; auto-parsed from DSN host (e.g. `o123.ingest.sentry.io` → `\"123\"`) if not set explicitly |\n| `enableLogs` | `Bool` | `false` | Enable structured logs |\n| `enableMetrics` | `Bool` | `true` | Enable Swift Metrics API (SDK 9.12+) |\n\n### Environment Variables\n\n| Variable | Maps to | Purpose |\n|----------|---------|---------|\n| `SENTRY_DSN` | `dsn` | macOS fallback only; set explicitly on iOS\u002FtvOS\u002FwatchOS\u002FvisionOS |\n| `SENTRY_RELEASE` | `releaseName` | Do not assume automatic Cocoa fallback; set explicitly if needed |\n| `SENTRY_ENVIRONMENT` | `environment` | Do not assume automatic Cocoa fallback; set explicitly if needed |\n\n### Platform Feature Support Matrix\n\n| Feature | iOS | tvOS | macOS | watchOS | visionOS |\n|---------|-----|------|-------|---------|----------|\n| Crash Reporting | Yes | Yes | Yes | No | Yes |\n| App Hangs | Yes | Yes | Yes | No | Yes |\n| Watchdog Termination | Yes | Yes | No | No | Yes |\n| App Start Tracing | Yes | Yes | No | No | Yes |\n| UIViewController Tracing | Yes | Yes | No | No | Yes |\n| SwiftUI Tracing | Yes | Yes | Yes | No | Yes |\n| Network Tracking | Yes | Yes | Yes | No | Yes |\n| Profiling | Yes | No | Yes | No | No |\n| Session Replay | Yes | Unofficial | No | No | No |\n| MetricKit | Yes (15+) | No | Yes (12+) | No | No |\n| Metrics API | Yes | Yes | Yes | Verify | Yes |\n\n### Production Settings\n\nLower sample rates for production to control volume and cost:\n\n```swift\noptions.tracesSampleRate = 0.2          \u002F\u002F 20% of transactions\n\noptions.configureProfiling = {\n    $0.sessionSampleRate = 0.1          \u002F\u002F 10% of sessions\n    $0.lifecycle = .trace\n}\n\noptions.sessionReplay.sessionSampleRate = 0.1   \u002F\u002F 10% continuous\noptions.sessionReplay.onErrorSampleRate = 1.0   \u002F\u002F 100% on error (keep high)\n\noptions.enableLogs = true\noptions.enableMetrics = true             \u002F\u002F default true in SDK 9.12+\noptions.debug = false                   \u002F\u002F never in production\n```\n\n---\n\n## Verification\n\nTest that Sentry is receiving events:\n\n```swift\n\u002F\u002F Trigger a test error event:\nSentrySDK.capture(message: \"Sentry Cocoa SDK test\")\n\n\u002F\u002F Or test crash reporting (without debugger — crashes are intercepted by debugger):\n\u002F\u002F SentrySDK.crash()  \u002F\u002F uncomment, run without debugger, relaunch to see crash report\n```\n\nCheck the Sentry dashboard within a few seconds. If nothing appears:\n1. Set `options.debug = true` — prints SDK internals to Xcode console\n2. Verify the DSN is correct and the project exists\n3. Ensure initialization is on the **main thread**\n\n---\n\n## Phase 4: Cross-Link\n\nAfter completing Apple setup, check for a companion backend missing Sentry coverage:\n\n```bash\n# Detect companion backend\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod 2>\u002Fdev\u002Fnull | head -5\ncat ..\u002Frequirements.txt ..\u002FPipfile 2>\u002Fdev\u002Fnull | head -5\ncat ..\u002FGemfile 2>\u002Fdev\u002Fnull | head -5\ncat ..\u002Fpackage.json 2>\u002Fdev\u002Fnull | grep -E '\"name\"|\"dependencies\"' | head -5\n```\n\nIf a backend is found, configure `tracePropagationTargets` to enable distributed tracing end-to-end, and suggest the matching skill:\n\n| Backend detected | Suggest skill | Trace header support |\n|-----------------|--------------|---------------------|\n| Go (`go.mod`) | `sentry-go-sdk` | Automatic |\n| Python (`requirements.txt`) | `sentry-python-sdk` | Automatic |\n| Ruby (`Gemfile`) | `sentry-ruby-sdk` | Automatic |\n| Node.js backend (`package.json`) | `sentry-node-sdk` (or `sentry-express-sdk`) | Automatic |\n\n---\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| Events not appearing | Set `debug: true`, verify DSN format, ensure init is on main thread |\n| Crashes not captured | **Run without debugger attached** — debugger intercepts signals |\n| App hangs not reported | Auto-disabled when debugger attached; check `appHangTimeoutInterval` |\n| Session Replay not recording | Verify `sessionSampleRate > 0` or `onErrorSampleRate > 0`; on iOS 26+ verify masking and any manual Liquid Glass gating |\n| Tracing data missing | Confirm `tracesSampleRate > 0`; check `enableAutoPerformanceTracing = true` |\n| Profiling data missing | Verify `sessionSampleRate > 0` in `configureProfiling`; for `.trace` lifecycle, tracing must be enabled |\n| `rsync.samba` build error (CocoaPods) | Target Settings → \"Enable User Script Sandbox\" → `NO` |\n| Multiple SPM products selected | Choose **only one** of `Sentry`, `Sentry-Dynamic`, `SentrySwiftUI`, `Sentry-WithoutUIKitOrAppKit`, or `SentrySPM` (with `NoUIFramework` trait on Swift 6.1+) |\n| `inAppExclude` compile error | Removed in SDK 9.0.0 — use `options.add(inAppInclude:)` |\n| `enableAppHangTrackingV2` compile error | Removed in SDK 9.0.0 — use `enableAppHangTracking`; V2 behavior is default where supported |\n| Watchdog termination not tracked | Requires `enableCrashHandler = true` (it is by default) |\n| Network breadcrumbs missing | Requires `enableSwizzling = true` (it is by default) |\n| `profilesSampleRate` compile error | Removed in SDK 9.0.0 — use `configureProfiling` closure instead |\n","> [All Skills](..\u002F..\u002FSKILL_TREE.md) > [SDK Setup](..\u002Fsentry-sdk-setup\u002FSKILL.md) > Cocoa SDK\n\n# Sentry Cocoa SDK\n\nOpinionated wizard that scans your Apple project and guides you through complete Sentry setup.\n\n## Invoke This Skill When\n\n- User asks to \"add Sentry to iOS\u002FmacOS\u002FtvOS\" or \"set up Sentry\" in an Apple app\n- User wants error monitoring, tracing, profiling, session replay, or logging in Swift\u002FObjC, or metrics in Swift\n- User mentions `sentry-cocoa`, `SentrySDK`, or the Apple\u002FiOS Sentry SDK\n- User wants to monitor crashes, app hangs, watchdog terminations, or performance\n\n> **Note:** SDK versions and APIs below reflect Sentry docs at time of writing (sentry-cocoa 9.15.0).\n> Always verify against [docs.sentry.io\u002Fplatforms\u002Fapple\u002F](https:\u002F\u002Fdocs.sentry.io\u002Fplatforms\u002Fapple\u002F) before implementing.\n\n---\n\n## Phase 1: Detect\n\nRun these commands to understand the project before making any recommendations:\n\n```bash\n# Check existing Sentry dependency\ngrep -rEi \"sentry|sentry-cocoa|SentrySPM|SentrySwiftUI\" \\\n  --include=\"Package.swift\" --include=\"Podfile\" --include=\"Cartfile\" \\\n  --include=\"Package.resolved\" --include=\"project.pbxproj\" . 2>\u002Fdev\u002Fnull | head -20\n\n# Detect UI framework (SwiftUI vs UIKit)\ngrep -rE \"@main|struct .*: App\" --include=\"*.swift\" . 2>\u002Fdev\u002Fnull | head -5\ngrep -rE \"AppDelegate|UIApplicationMain|@UIApplicationDelegateAdaptor\" --include=\"*.swift\" . 2>\u002Fdev\u002Fnull | head -5\n\n# Detect platform and deployment targets\ngrep -rE \"platforms:|\\\\.iOS|\\\\.macOS|\\\\.tvOS|\\\\.watchOS|\\\\.visionOS|IPHONEOS_DEPLOYMENT_TARGET|MACOSX_DEPLOYMENT_TARGET|TVOS_DEPLOYMENT_TARGET|WATCHOS_DEPLOYMENT_TARGET|XROS_DEPLOYMENT_TARGET\" \\\n  --include=\"Package.swift\" --include=\"project.pbxproj\" . 2>\u002Fdev\u002Fnull | head -20\ngrep -E \"platform :ios|platform :osx|platform :tvos|platform :watchos\" Podfile 2>\u002Fdev\u002Fnull\n\n# Detect logging\ngrep -rE \"import OSLog|import os\\\\.log|Logger\\\\(|CocoaLumberjack|DDLog\" --include=\"*.swift\" . 2>\u002Fdev\u002Fnull | head -5\n\n# Detect companion backend\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\nls ..\u002Fgo.mod ..\u002Frequirements.txt ..\u002FGemfile ..\u002Fpackage.json 2>\u002Fdev\u002Fnull\n```\n\n**What to note:**\n- Is `sentry-cocoa` already in `Package.swift` or `Podfile`? If yes, skip to Phase 2 (configure features).\n- SwiftUI (`@main App` struct) or UIKit (`AppDelegate`)? Determines init pattern.\n- Which Apple platforms? (Affects which features are available — see Platform Support Matrix.)\n- Existing logging library? (Enables structured log capture.)\n- SwiftUI tracing import\u002Fproduct? `SentrySwiftUI` still exists but is deprecated in SDK 9.4.1+; prefer the main `Sentry` module for released binary products.\n- Companion backend? (Triggers Phase 4 cross-link for distributed tracing.)\n\n---\n\n## Phase 2: Recommend\n\nBased on what you found, present a concrete recommendation. Don't ask open-ended questions — lead with a proposal:\n\n**Recommended (core coverage):**\n- **Error Monitoring** — always; crash reporting, app hangs, watchdog terminations, NSError\u002FSwift errors\n- **Tracing** — always for apps; auto-instruments app launch, network, UIViewController, file I\u002FO, Core Data\n- **Profiling** — production iOS\u002FmacOS apps; UI profiling via `configureProfiling`\n\n**Optional (enhanced observability):**\n- **Session Replay** — user-facing iOS apps; verify masking on iOS 26+ \u002F Liquid Glass builds\n- **Logging** — when structured log capture is needed\n- **Metrics** — Swift apps needing aggregate counters, gauges, or distributions\n- **User Feedback** — apps that want crash\u002Ferror feedback forms from users\n\n**Not available for Cocoa:**\n- Crons — backend only\n- AI Monitoring — JS\u002FPython only\n\n**Recommendation logic:**\n\n| Feature | Recommend when... |\n|---------|------------------|\n| Error Monitoring | **Always** — non-negotiable baseline |\n| Tracing | **Always for apps** — rich auto-instrumentation out of the box |\n| Profiling | iOS\u002FmacOS production apps where performance matters (not tvOS\u002FwatchOS\u002FvisionOS) |\n| Session Replay | User-facing iOS apps; tvOS may work but is not officially supported |\n| Logging | Existing `os.log` \u002F CocoaLumberjack usage, or structured logs needed |\n| Metrics | Aggregate product or health signals that should not create issues; Swift only, SDK 9.12+ |\n| User Feedback | Apps wanting in-app bug reports with screenshots |\n\nPropose: *\"I recommend Error Monitoring + Tracing + Profiling. Want me to also add Session Replay and Logging?\"*\n\n---\n\n## Phase 3: Guide\n\n### Install\n\n**Option 1 — Sentry Wizard (recommended):**\n\n> **You need to run this yourself** — the wizard opens a browser for login and requires interactive input that the agent can't handle. Copy-paste into your terminal:\n>\n> ```\n> brew install getsentry\u002Ftools\u002Fsentry-wizard && sentry-wizard -i ios\n> ```\n>\n> It handles login, org\u002Fproject selection, auth token setup, SDK installation, AppDelegate updates, and dSYM\u002Fdebug symbol upload build phases.\n>\n> **Once it finishes, come back and skip to [Verification](#verification).**\n\nIf the user skips the wizard, proceed with Option 2 (SPM\u002FCocoaPods) and manual setup below.\n\n**Option 2 — Swift Package Manager:** File → Add Packages → enter:\n```\nhttps:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa.git\n```\n\nOr in `Package.swift`:\n```swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\", from: \"9.15.0\"),\n```\n\n**SPM Products** — choose **exactly one** per target:\n\n| Product | Use Case |\n|---------|----------|\n| `Sentry` | **Recommended** — static framework, fast app start; includes SwiftUI APIs in SDK 9.4.1+ |\n| `Sentry-Dynamic` | Dynamic framework alternative |\n| `SentrySwiftUI` | Legacy\u002Fdeprecated re-export for SwiftUI APIs; use only when maintaining older setup |\n| `Sentry-WithoutUIKitOrAppKit` | watchOS, app extensions, CLI tools (Swift \u003C 6.1) |\n| `SentrySPM` + `NoUIFramework` trait | Source build without UIKit\u002FAppKit for CLI\u002Fheadless targets (**SDK 9.7+ \u002F Swift 6.1+ \u002F Xcode 26.4+** for Xcode UI) |\n\n> Warning: Xcode allows selecting multiple products — choose only one.\n>\n> If using `SentrySPM` from source, current source-build projects may import `SentrySwift` instead of `Sentry`; verify the module name in the target. Released binary products use `import Sentry`.\n\n**Swift 6.1+ trait-based opt-out of UIKit\u002FAppKit** (requires `Package@swift-6.1.swift` manifest):\n\n```swift\n\u002F\u002F Package.swift (Swift 6.1+)\n.package(\n    url: \"https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\",\n    from: \"9.15.0\",\n    traits: [\"NoUIFramework\"]\n),\n\n\u002F\u002F In your target's dependencies:\n.product(name: \"SentrySPM\", package: \"sentry-cocoa\")\n```\n\nThis is the preferred opt-out path for command-line\u002Fheadless targets on Swift 6.1+. It compiles the SDK from source so the trait can remove UIKit\u002FAppKit\u002FSwiftUI linkage. For Swift \u003C 6.1 continue using `Sentry-WithoutUIKitOrAppKit`.\n\n> **Note:** Package traits are visible in the Xcode UI starting with **Xcode 26.4+**. On older Xcode versions, traits still work when declared in `Package.swift` but won't appear in the GUI.\n\n**Option 3 — CocoaPods (deprecated; prefer SPM):**\n```ruby\nplatform :ios, '15.0'\nuse_frameworks!\n\ntarget 'YourApp' do\n  pod 'Sentry', :git => 'https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa.git', :tag => '9.15.0'\nend\n```\n\nSentry plans to stop publishing CocoaPods releases at the end of June 2026; use this only for existing CocoaPods projects.\n\n> **Known issue (Xcode 14+):** Sandbox `rsync.samba` error → Target Settings → \"Enable User Script Sandbox\" → `NO`.\n\n**Option 4 — SentryObjC (for pure Objective-C\u002FC++ projects):**\n\nFor pure Objective-C or Objective-C++ projects that **cannot enable Clang modules** (e.g., `-fmodules=NO`), use the SentryObjC wrapper SDK. It provides the same functionality as the main SDK but with pure Objective-C headers that don't require Swift module imports.\n\n**SPM:**\n```swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\", from: \"9.17.1\"),\n\n\u002F\u002F In your target's dependencies:\n.product(name: \"SentryObjC\", package: \"sentry-cocoa\")\n```\n\nOr download `SentryObjC-Dynamic.xcframework.zip` from the [releases page](https:\u002F\u002Fgithub.com\u002Fgetsentry\u002Fsentry-cocoa\u002Freleases).\n\n**Migration from regular Sentry to SentryObjC:**\n- Change `#import \u003CSentry\u002FSentry.h>` to `#import \u003CSentryObjC\u002FSentryObjC.h>`\n- Rename `Sentry`-prefixed types to `SentryObjC` (e.g., `SentrySDK` → `SentryObjCSDK`, `SentryOptions` → `SentryObjCOptions`)\n- The API surface is otherwise identical\n\nMost users should use the standard `Sentry` product (Option 2). Only use `SentryObjC` if you have a specific requirement preventing Clang modules.\n\n---\n\n### Quick Start — Recommended Init\n\nFull iOS app config enabling the most common features with sensible defaults. Add before any other code at app startup.\n\nFor macOS, watchOS, app extensions, or `NoUIFramework` builds, omit options that are unavailable for that platform (`sessionReplay`, screenshots\u002Fview hierarchy, user-feedback UI, UIKit tracing, and profiling on tvOS\u002FwatchOS\u002FvisionOS). Keep the core `dsn`, environment, error monitoring, tracing, logs, and metrics settings that compile for the detected target.\n\n**SwiftUI — App entry point:**\n```swift\nimport SwiftUI\nimport Sentry\n\n@main\nstruct MyApp: App {\n    init() {\n        SentrySDK.start { options in\n            options.dsn = ProcessInfo.processInfo.environment[\"SENTRY_DSN\"]\n                ?? \"https:\u002F\u002FexamplePublicKey@o0.ingest.sentry.io\u002F0\"\n            options.environment = ProcessInfo.processInfo.environment[\"SENTRY_ENVIRONMENT\"]\n                ?? \"production\"\n            \u002F\u002F releaseName defaults to \"\u003Cbundle id>@\u003Cversion>+\u003Cbuild>\"; set only if you need a custom release.\n\n            \u002F\u002F Error monitoring (on by default — explicit for clarity)\n            options.enableCrashHandler = true\n            options.enableAppHangTracking = true\n            options.enableReportNonFullyBlockingAppHangs = true\n            options.enableWatchdogTerminationTracking = true\n            options.attachScreenshot = true\n            options.attachViewHierarchy = true\n            options.sendDefaultPii = true\n\n            \u002F\u002F Tracing\n            options.tracesSampleRate = 1.0          \u002F\u002F lower to 0.2 in high-traffic production\n\n            \u002F\u002F Profiling (SDK 9.0.0+ API)\n            options.configureProfiling = {\n                $0.sessionSampleRate = 1.0\n                $0.lifecycle = .trace\n            }\n\n            \u002F\u002F Session Replay. Keep production sampling conservative and verify masking on iOS 26+.\n            options.sessionReplay.sessionSampleRate = 0.1\n            options.sessionReplay.onErrorSampleRate = 1.0\n\n            \u002F\u002F Logging (SDK 9.0.0+ top-level; use options.experimental.enableLogs in 8.x)\n            options.enableLogs = true\n\n            \u002F\u002F Metrics are enabled by default in SDK 9.12+. Set false only to opt out.\n            options.enableMetrics = true\n        }\n    }\n\n    var body: some Scene {\n        WindowGroup { ContentView() }\n    }\n}\n```\n\n**UIKit — AppDelegate:**\n```swift\nimport UIKit\nimport Sentry\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n    func application(\n        _ application: UIApplication,\n        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?\n    ) -> Bool {\n        SentrySDK.start { options in\n            options.dsn = ProcessInfo.processInfo.environment[\"SENTRY_DSN\"]\n                ?? \"https:\u002F\u002FexamplePublicKey@o0.ingest.sentry.io\u002F0\"\n            options.environment = ProcessInfo.processInfo.environment[\"SENTRY_ENVIRONMENT\"]\n                ?? \"production\"\n            \u002F\u002F releaseName defaults to \"\u003Cbundle id>@\u003Cversion>+\u003Cbuild>\"; set only if you need a custom release.\n\n            options.enableCrashHandler = true\n            options.enableAppHangTracking = true\n            options.enableReportNonFullyBlockingAppHangs = true\n            options.enableWatchdogTerminationTracking = true\n            options.attachScreenshot = true\n            options.attachViewHierarchy = true\n            options.sendDefaultPii = true\n\n            options.tracesSampleRate = 1.0\n\n            options.configureProfiling = {\n                $0.sessionSampleRate = 1.0\n                $0.lifecycle = .trace\n            }\n\n            options.sessionReplay.sessionSampleRate = 0.1\n            options.sessionReplay.onErrorSampleRate = 1.0\n\n            \u002F\u002F Logging (SDK 9.0.0+ top-level; use options.experimental.enableLogs in 8.x)\n            options.enableLogs = true\n\n            \u002F\u002F Metrics are enabled by default in SDK 9.12+. Set false only to opt out.\n            options.enableMetrics = true\n        }\n        return true\n    }\n}\n```\n\n> Warning: SDK initialization must occur on the **main thread**.\n\n---\n\n### For Each Agreed Feature\n\nWalk through features one at a time. Load the reference file for each, follow its steps, and verify before moving to the next:\n\n| Feature | Reference file | Load when... |\n|---------|---------------|-------------|\n| Error Monitoring | `${SKILL_ROOT}\u002Freferences\u002Ferror-monitoring.md` | Always (baseline) |\n| Tracing | `${SKILL_ROOT}\u002Freferences\u002Ftracing.md` | App launch, network, UIViewController perf |\n| Profiling | `${SKILL_ROOT}\u002Freferences\u002Fprofiling.md` | Production perf-sensitive apps |\n| Session Replay | `${SKILL_ROOT}\u002Freferences\u002Fsession-replay.md` | User-facing iOS apps; tvOS only with caveat |\n| Logging | `${SKILL_ROOT}\u002Freferences\u002Flogging.md` | Structured log capture needed |\n| Metrics | `${SKILL_ROOT}\u002Freferences\u002Fmetrics.md` | Aggregate counters, gauges, distributions |\n| User Feedback | `${SKILL_ROOT}\u002Freferences\u002Fuser-feedback.md` | In-app bug reporting wanted |\n\nFor each feature: `Read ${SKILL_ROOT}\u002Freferences\u002F\u003Cfeature>.md`, follow steps exactly, verify it works.\n\n---\n\n## Configuration Reference\n\n### Key `SentryOptions` Fields\n\n| Option | Type | Default | Purpose |\n|--------|------|---------|---------|\n| `dsn` | `String?` | `nil` | SDK disabled if empty; macOS can read `SENTRY_DSN`, other Apple platforms must set explicitly |\n| `environment` | `String` | `\"production\"` | e.g., `\"production\"` |\n| `releaseName` | `String?` | bundle-derived | Defaults to `\u003Cbundle id>@\u003Cversion>+\u003Cbuild>` |\n| `debug` | `Bool` | `false` | Verbose SDK output — **disable in production** |\n| `sendDefaultPii` | `Bool` | `false` | Include IP, user info from active integrations |\n| `enableCrashHandler` | `Bool` | `true` | Master switch for crash reporting |\n| `enableAppHangTracking` | `Bool` | `true` | Master switch for app hang tracking |\n| `enableReportNonFullyBlockingAppHangs` | `Bool` | `true` | Report non-fully-blocking hangs on supported UI platforms |\n| `appHangTimeoutInterval` | `Double` | `2.0` | Seconds before classifying as hang |\n| `enableWatchdogTerminationTracking` | `Bool` | `true` | Track watchdog kills (iOS, tvOS, Mac Catalyst) |\n| `attachScreenshot` | `Bool` | `false` | Capture screenshot on error |\n| `attachViewHierarchy` | `Bool` | `false` | Capture view hierarchy on error |\n| `tracesSampleRate` | `NSNumber?` | `nil` | Transaction sample rate (`nil` = tracing disabled); Swift auto-boxes `Double` literals (e.g. `1.0` → `NSNumber`) |\n| `tracesSampler` | `Closure` | `nil` | Dynamic per-transaction sampling (overrides rate) |\n| `enableAutoPerformanceTracing` | `Bool` | `true` | Master switch for auto-instrumentation |\n| `tracePropagationTargets` | `[Any]` | all requests | Strings or `NSRegularExpression` values that receive distributed trace headers |\n| `enableCaptureFailedRequests` | `Bool` | `true` | Auto-capture HTTP 5xx errors as events |\n| `enableNetworkBreadcrumbs` | `Bool` | `true` | Breadcrumbs for outgoing HTTP requests |\n| `add(inAppInclude:)` | Method | bundle executable | Add module prefixes treated as \"in-app\" code |\n| `maxBreadcrumbs` | `Int` | `100` | Max breadcrumbs per event |\n| `sampleRate` | `Float` | `1.0` | Error event sample rate |\n| `beforeSend` | `Closure` | `nil` | Hook to mutate\u002Fdrop error events |\n| `onLastRunStatusDetermined` | `Closure` | `nil` | Called after SDK determines previous launch crash status |\n| `strictTraceContinuation` | `Bool` | `false` | Reject incoming traces from other orgs; validates `sentry-org_id` in baggage headers (sentry-cocoa ≥9.10.0) |\n| `orgId` | `String?` | `nil` | Organization ID for strict trace validation; auto-parsed from DSN host (e.g. `o123.ingest.sentry.io` → `\"123\"`) if not set explicitly |\n| `enableLogs` | `Bool` | `false` | Enable structured logs |\n| `enableMetrics` | `Bool` | `true` | Enable Swift Metrics API (SDK 9.12+) |\n\n### Environment Variables\n\n| Variable | Maps to | Purpose |\n|----------|---------|---------|\n| `SENTRY_DSN` | `dsn` | macOS fallback only; set explicitly on iOS\u002FtvOS\u002FwatchOS\u002FvisionOS |\n| `SENTRY_RELEASE` | `releaseName` | Do not assume automatic Cocoa fallback; set explicitly if needed |\n| `SENTRY_ENVIRONMENT` | `environment` | Do not assume automatic Cocoa fallback; set explicitly if needed |\n\n### Platform Feature Support Matrix\n\n| Feature | iOS | tvOS | macOS | watchOS | visionOS |\n|---------|-----|------|-------|---------|----------|\n| Crash Reporting | Yes | Yes | Yes | No | Yes |\n| App Hangs | Yes | Yes | Yes | No | Yes |\n| Watchdog Termination | Yes | Yes | No | No | Yes |\n| App Start Tracing | Yes | Yes | No | No | Yes |\n| UIViewController Tracing | Yes | Yes | No | No | Yes |\n| SwiftUI Tracing | Yes | Yes | Yes | No | Yes |\n| Network Tracking | Yes | Yes | Yes | No | Yes |\n| Profiling | Yes | No | Yes | No | No |\n| Session Replay | Yes | Unofficial | No | No | No |\n| MetricKit | Yes (15+) | No | Yes (12+) | No | No |\n| Metrics API | Yes | Yes | Yes | Verify | Yes |\n\n### Production Settings\n\nLower sample rates for production to control volume and cost:\n\n```swift\noptions.tracesSampleRate = 0.2          \u002F\u002F 20% of transactions\n\noptions.configureProfiling = {\n    $0.sessionSampleRate = 0.1          \u002F\u002F 10% of sessions\n    $0.lifecycle = .trace\n}\n\noptions.sessionReplay.sessionSampleRate = 0.1   \u002F\u002F 10% continuous\noptions.sessionReplay.onErrorSampleRate = 1.0   \u002F\u002F 100% on error (keep high)\n\noptions.enableLogs = true\noptions.enableMetrics = true             \u002F\u002F default true in SDK 9.12+\noptions.debug = false                   \u002F\u002F never in production\n```\n\n---\n\n## Verification\n\nTest that Sentry is receiving events:\n\n```swift\n\u002F\u002F Trigger a test error event:\nSentrySDK.capture(message: \"Sentry Cocoa SDK test\")\n\n\u002F\u002F Or test crash reporting (without debugger — crashes are intercepted by debugger):\n\u002F\u002F SentrySDK.crash()  \u002F\u002F uncomment, run without debugger, relaunch to see crash report\n```\n\nCheck the Sentry dashboard within a few seconds. If nothing appears:\n1. Set `options.debug = true` — prints SDK internals to Xcode console\n2. Verify the DSN is correct and the project exists\n3. Ensure initialization is on the **main thread**\n\n---\n\n## Phase 4: Cross-Link\n\nAfter completing Apple setup, check for a companion backend missing Sentry coverage:\n\n```bash\n# Detect companion backend\nls ..\u002Fbackend ..\u002Fserver ..\u002Fapi 2>\u002Fdev\u002Fnull\ncat ..\u002Fgo.mod 2>\u002Fdev\u002Fnull | head -5\ncat ..\u002Frequirements.txt ..\u002FPipfile 2>\u002Fdev\u002Fnull | head -5\ncat ..\u002FGemfile 2>\u002Fdev\u002Fnull | head -5\ncat ..\u002Fpackage.json 2>\u002Fdev\u002Fnull | grep -E '\"name\"|\"dependencies\"' | head -5\n```\n\nIf a backend is found, configure `tracePropagationTargets` to enable distributed tracing end-to-end, and suggest the matching skill:\n\n| Backend detected | Suggest skill | Trace header support |\n|-----------------|--------------|---------------------|\n| Go (`go.mod`) | `sentry-go-sdk` | Automatic |\n| Python (`requirements.txt`) | `sentry-python-sdk` | Automatic |\n| Ruby (`Gemfile`) | `sentry-ruby-sdk` | Automatic |\n| Node.js backend (`package.json`) | `sentry-node-sdk` (or `sentry-express-sdk`) | Automatic |\n\n---\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| Events not appearing | Set `debug: true`, verify DSN format, ensure init is on main thread |\n| Crashes not captured | **Run without debugger attached** — debugger intercepts signals |\n| App hangs not reported | Auto-disabled when debugger attached; check `appHangTimeoutInterval` |\n| Session Replay not recording | Verify `sessionSampleRate > 0` or `onErrorSampleRate > 0`; on iOS 26+ verify masking and any manual Liquid Glass gating |\n| Tracing data missing | Confirm `tracesSampleRate > 0`; check `enableAutoPerformanceTracing = true` |\n| Profiling data missing | Verify `sessionSampleRate > 0` in `configureProfiling`; for `.trace` lifecycle, tracing must be enabled |\n| `rsync.samba` build error (CocoaPods) | Target Settings → \"Enable User Script Sandbox\" → `NO` |\n| Multiple SPM products selected | Choose **only one** of `Sentry`, `Sentry-Dynamic`, `SentrySwiftUI`, `Sentry-WithoutUIKitOrAppKit`, or `SentrySPM` (with `NoUIFramework` trait on Swift 6.1+) |\n| `inAppExclude` compile error | Removed in SDK 9.0.0 — use `options.add(inAppInclude:)` |\n| `enableAppHangTrackingV2` compile error | Removed in SDK 9.0.0 — use `enableAppHangTracking`; V2 behavior is default where supported |\n| Watchdog termination not tracked | Requires `enableCrashHandler = true` (it is by default) |\n| Network breadcrumbs missing | Requires `enableSwizzling = true` (it is by default) |\n| `profilesSampleRate` compile error | Removed in SDK 9.0.0 — use `configureProfiling` closure instead |\n",{"name":5,"parent":24,"license":15,"category":25,"description":7,"disable-model-invocation":26},"sentry-sdk-setup","sdk-setup",true,"main","b1e4ffadb4f933bbbcaa03a83f8b9929171ac28b",".agents\u002Fskills\u002Fsentry-cocoa-sdk",0,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR","https:\u002F\u002Fgithub.com\u002FHazek-dc","2026-10-22 08:36:44",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":26},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill sentry-cocoa-sdk",{"tool":40,"command":41},"bunx","bunx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill sentry-cocoa-sdk",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Hazek-dc\u002FPresensiGuru_FaceNet_EMAR --skill sentry-cocoa-sdk","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002FSKILL.md",[47,53,57,61,65,69,73],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Ferror-monitoring.md","REFERENCE","参考文档",12679,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002Freferences\u002Ferror-monitoring.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Flogging.md",7279,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002Freferences\u002Flogging.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fmetrics.md",3848,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002Freferences\u002Fmetrics.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fprofiling.md",8063,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002Freferences\u002Fprofiling.md",{"path":66,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fsession-replay.md",9853,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002Freferences\u002Fsession-replay.md",{"path":70,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Ftracing.md",17380,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002Freferences\u002Ftracing.md",{"path":74,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fuser-feedback.md",10372,"https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsentry-cocoa-sdk\u002Freferences\u002Fuser-feedback.md",[78,86,93,100,107,114],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7DS6GGYRZAYD33PFPS8Z2T3","testing-best-practices","Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.","MIT","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftesting-best-practices\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7DS6BC3AW7HTPRHE2TTVKWM","tailwindcss-development","Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex\u002Fgrid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3\u002Fv4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML\u002FCSS component, CSS file audits, build tool configuration, and vanilla CSS.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Ftailwindcss-development\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7DS66GE6B11MYJDVC74HXM4","laravel-best-practices","Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Flaravel-best-practices\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7DS5ZW717DMS6P1E90AQCKV","infer-conventions","Use this skill to analyze how a Laravel application is actually written and record its conventions as shared rules. Trigger when the user wants to detect, infer, document, or standardize project conventions or coding style, set up or grow `.ai\u002Frules`, resolve mixed or conflicting patterns (e.g. \"are we using Form Requests or inline validation?\"), or onboard agents and teammates to \"how we do things here\". Covers: a systematic sweep of ~49 Laravel convention dimensions (validation, models, architecture, testing, frontend, database, console), open-ended house-pattern discovery, conflict reporting, and recording rules scoped to the right paths via the Boost `record-rule` MCP tool. Only run this skill when the user explicitly asks for it; never start a sweep as part of another task. Do not use for one-off code review, enforcing formatting a linter already handles, or editing `.ai\u002Frules` files by hand.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finfer-conventions\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M7DS5W12RGCVJTFQJ1N0GB8E","inertia-react-development","Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using \u003CLink>, \u003CForm>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Finertia-react-development\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":19},"01M7DS5PVDPMPCWSK2RXPDC9BB","deploying-to-cloud","Deploys and manages Laravel applications on Laravel Cloud using the `cloud` CLI. Use when the user wants to deploy an app, ship to Cloud, create or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.","https:\u002F\u002Fgithub.com\u002FHazek-dc\u002FPresensiGuru_FaceNet_EMAR\u002Fblob\u002Fmain\u002Fattendance-web\u002F.claude\u002Fskills\u002Fdeploying-to-cloud\u002FSKILL.md",[],[]]