Skip to content

docs(cocoa): Update SDK skill guidance#132

Open
philprime wants to merge 3 commits into
mainfrom
philprime/cocoa-sdk-1363
Open

docs(cocoa): Update SDK skill guidance#132
philprime wants to merge 3 commits into
mainfrom
philprime/cocoa-sdk-1363

Conversation

@philprime
Copy link
Copy Markdown
Member

Refresh the Cocoa SDK skill and reference docs so agents recommend current sentry-cocoa setup patterns.

This updates guidance after comparing the local Apple docs, current sentry-cocoa source/changelog, and the Flinky sample. The previous skill still referenced v8-era APIs and treated metrics as unavailable; this adds the GA Swift metrics reference and corrects App Hangs, SwiftUI, Session Replay, Profiling, Logging, User Feedback, SPM/CocoaPods, and platform support details.

Validated with scripts/build-skill-tree.sh --check, git diff --check, and targeted scans for stale Cocoa API snippets.

philprime and others added 2 commits May 20, 2026 11:11
Refresh the Cocoa SDK skill and references against current sentry-cocoa APIs.

Add metrics guidance and remove stale v8-era setup recommendations.

Co-Authored-By: GPT-5 Codex <[email protected]>
Point the Cocoa skill at public GitHub repositories instead of local paths.

Keep detection commands on grep to match the rest of the SDK skill library.

Co-Authored-By: GPT-5 Codex <[email protected]>
Comment thread skills/sentry-cocoa-sdk/SKILL.md Outdated
@philprime philprime marked this pull request as ready for review May 20, 2026 09:31
@philprime philprime self-assigned this May 20, 2026
| `enableSwizzling` | `Bool` | `true` | Master switch for method swizzling (required by several auto-instrumentation features) |
| `strictTraceContinuation` | `Bool` | `false` | Only continue an incoming trace when `orgId` matches; prevents cross-org trace continuation (SDK 9.x+) |
| `orgId` | `UInt64?` | auto-parsed from DSN | Organization ID used for strict trace continuation validation; auto-parsed from the DSN host |
| `orgId` | `String?` | auto-parsed from DSN | Organization ID used for strict trace continuation validation; auto-parsed from the DSN host |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation inconsistently uses the old callback name onCrashedLastRun in code examples, which was renamed to onLastRunStatusDetermined, causing compilation errors.
Severity: HIGH

Suggested Fix

Update all occurrences of the deprecated onCrashedLastRun callback to onLastRunStatusDetermined. Specifically, correct the code example and related text in skills/sentry-cocoa-sdk/references/error-monitoring.md and the troubleshooting section in skills/sentry-cocoa-sdk/SKILL.md.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills/sentry-cocoa-sdk/references/tracing.md#L26

Potential issue: The documentation was updated to rename the `onCrashedLastRun` callback
to `onLastRunStatusDetermined` in the main options table. However, this change was not
applied consistently. The reference documentation in `error-monitoring.md` and the
troubleshooting guide in `SKILL.md` still refer to the old property name,
`onCrashedLastRun`. Developers following these guides with SDK version 9.x will
encounter a compile-time error, as the `onCrashedLastRun` property no longer exists on
the `SentryOptions` type.

Also affects:

  • skills/sentry-cocoa-sdk/SKILL.md:305

Did we get this right? 👍 / 👎 to inform future reviews.

Comment on lines +131 to +136
"api.myapp.com",
".*\\.myapp\\.com"
]
options.sessionReplay.networkDetailDenyUrls = [
"api.myapp.com/oauth",
"api.myapp.com/payment"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation's platform support matrix incorrectly states watchOS does not support crash reporting, contradicting other guidance that recommends a watchOS-specific product.
Severity: LOW

Suggested Fix

Update the platform support matrix in SKILL.md to accurately reflect that crash reporting is supported on watchOS. Change the entry for watchOS under the "Crash Reporting" feature from "No" to "Yes".

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills/sentry-cocoa-sdk/references/session-replay.md#L131-L136

Potential issue: The platform support matrix in `SKILL.md` incorrectly states that crash
reporting is not supported on watchOS. However, the same document recommends using the
`Sentry-WithoutUIKitOrAppKit` product specifically for watchOS and app extensions. This
creates a contradiction, as the primary purpose of the SDK on watchOS is typically crash
reporting. This conflicting information will confuse developers about the SDK's
capabilities on the watchOS platform.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant