Skip to content

Expose iOS enableMemoryIntrospection option #6547

Description

@antonis

Description

sentry-cocoa 9.24.0 added a public enableMemoryIntrospection option on SentryOptions (getsentry/sentry-cocoa#7501, PR getsentry/sentry-cocoa#8571).

When the SDK captures a native crash (e.g. EXC_BAD_ACCESS), SentryCrash reads memory near the crash site and embeds string-based stack contents in the event. This can expose sensitive information (user IDs, personal data), which may even surface in the issue title. enableMemoryIntrospection is the public toggle for the previously-internal SentryCrash.introspectMemory behavior, letting privacy-sensitive apps keep crash reporting while omitting memory contents.

  • Default: false as of cocoa 9.24.0 (the default was flipped from true to false for privacy).
  • Platform: iOS-only. RN captures native iOS crashes through Cocoa, so the same PII concern applies. There is no Android or JS-layer equivalent.

Suggested change

Add an enableMemoryIntrospection?: boolean option, documented @platform ios, similar to the existing enableAppHangTracking / appHangTimeoutInterval options (packages/core/src/js/options.ts).

iOS options are passed straight through to Cocoa as a dictionary via PrivateSentrySDKOnly.optionsWithDictionary (packages/core/ios/RNSentryStart.m), so no additional ObjC bridging should be required — the main work is surfacing and documenting the typed option.

Blocked on

The SDK currently bundles sentry-cocoa 9.19.1 (packages/core/RNSentry.podspec). This option landed in 9.24.0, so exposing it depends on bumping the bundled Cocoa version to >= 9.24.0.

Reference

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions