Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Migrate iOS enableUnhandledCPPExceptionsV2 off the deprecated experimental alias

Đang mở
#6,783 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

React-Native

Description

sentry-cocoa #9134 promotes enableUnhandledCPPExceptionsV2 from SentryOptions.experimental up to a top-level SentryOptions property. The old experimental.enableUnhandledCPPExceptionsV2 is kept as a shared-value deprecated alias and, per the deprecation annotation, will be removed in the next cocoa minor release.

The RN SDK reads and writes this option in packages/core/ios/RNSentryExperimentalOptions.m:

sentryOptions.experimental.enableUnhandledCPPExceptionsV2 = enabled;   // setter
return sentryOptions.experimental.enableUnhandledCPPExceptionsV2;       // getter

Impact

  • At the cocoa release that ships #9134 (a v9 minor): RN still compiles and behaves identically — the alias shares the same backing value — but these two lines will emit deprecation warnings (the ObjC property gains DEPRECATED_MSG_ATTRIBUTE).
  • At the following cocoa minor, where the alias is removed: sentryOptions.experimental.enableUnhandledCPPExceptionsV2 will fail to compile.

We currently bundle cocoa 9.29.0, so there is no runtime breakage today. This is a tracking issue to migrate ahead of the removal.

Action

Switch to the top-level property (exposed on the ObjC wrapper SentryObjCOptions.h) at the next cocoa bump that contains #9134:

sentryOptions.enableUnhandledCPPExceptionsV2 = enabled;
return sentryOptions.enableUnhandledCPPExceptionsV2;
  • Behavior is identical; the top-level property exists in the same release, so this also clears the deprecation warning immediately.
  • The JS _experiments.enableUnhandledCPPExceptionsV2 key and RN's public API stay unchanged — this is purely the native mapping in RNSentryExperimentalOptions.m.

References

Ngôn ngữ chính
TypeScript
Star
1.8k
Fork
369
Merge trung bình
19 giờ 53 phút
Pull request đã merge (30 ngày)
107

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-react-native

Tất cả issue của getsentry/sentry-react-native

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.