Skip to content

Conversation

@jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented Jan 7, 2026

Note

#skip-changelog (merges to #4781)

@linear
Copy link

linear bot commented Jan 7, 2026

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.80%. Comparing base (dc6c357) to head (f34b077).

Additional details and impacted files
@@                           Coverage Diff                            @@
##           deps/modules/sentry-cocoa.properties    #4830      +/-   ##
========================================================================
+ Coverage                                 73.76%   73.80%   +0.03%     
========================================================================
  Files                                       483      483              
  Lines                                     17551    17551              
  Branches                                   3461     3461              
========================================================================
+ Hits                                      12947    12954       +7     
+ Misses                                     3748     3745       -3     
+ Partials                                    856      852       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bruno-garcia bruno-garcia force-pushed the deps/modules/sentry-cocoa.properties branch 2 times, most recently from 509f0c9 to fe091a7 Compare January 15, 2026 03:29
@bruno-garcia bruno-garcia force-pushed the deps/modules/sentry-cocoa.properties branch 2 times, most recently from 76b917d to 1c85ec4 Compare January 21, 2026 03:29
@bruno-garcia bruno-garcia force-pushed the deps/modules/sentry-cocoa.properties branch from 1c85ec4 to dc6c357 Compare January 22, 2026 03:30
@jpnurmi jpnurmi force-pushed the deps/sentry-cocoa-9 branch from c56e53c to dd04bd0 Compare January 22, 2026 07:42
@jpnurmi jpnurmi force-pushed the deps/sentry-cocoa-9 branch from dd04bd0 to cf215b1 Compare January 22, 2026 08:06
It has multiple conflicting NSNumber[] constructors for boolean,
integer, and float arrays:

error CS0111: Type 'SentryAttribute' already defines a member called 'Constructor' with the same parameter types
@jpnurmi jpnurmi changed the title WIP: Update bindings for Cocoa SDK v9 Update bindings for Cocoa SDK v9 Jan 22, 2026
@jpnurmi jpnurmi marked this pull request as ready for review January 22, 2026 12:48
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Collaborator

@jamescrosswell jamescrosswell left a comment

Choose a reason for hiding this comment

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

Nice work - thanks @jpnurmi !

@bruno-garcia bruno-garcia force-pushed the deps/modules/sentry-cocoa.properties branch from dc6c357 to f4ed890 Compare January 23, 2026 03:29
Copy link
Member

Choose a reason for hiding this comment

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

question:

This replaces the above auto-generated PR, right?

.WithAttribute("SentryBeforeSendEventCallback", "return: NullAllowed")
.WithAttribute("SentryTracesSamplerCallback", "return: NullAllowed")
// Fix nullable return attributes
.RemoveAttribute("PrivateSentrySDKOnly", "Capture*", "NullAllowed")
Copy link
Member

Choose a reason for hiding this comment

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

question:

Should we be explicitly removing the NullAllowed attribute for CaptureScreenshots and CaptureViewHierarchy, since we are adding [return: NullAllowed] on both of these methods below? Or are there more?

I am wondering if we could accidentally miss some new Capture* methods in the future.

public bool EnableAppHangTracking { get; set; } = false;

/// <summary>
/// IMPORTANT: This feature is experimental and may have bugs.
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: change phrasing

-/// IMPORTANT: This feature is experimental and may have bugs.
+/// IMPORTANT: App Hangs V2 is now the default.

(didn't do a GitHub suggestion, as the result looked incorrect)

Comment on lines 74 to 75
/// As of version 8.39.0-beta.1 of the sentry-cocoa SDK, you can enable AppHangsV2, which is available on iOS and tvOS.
/// The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: add clarification

Add the updated text from: https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2

 /// As of version 8.39.0-beta.1 of the sentry-cocoa SDK, you can enable AppHangsV2, which is available on iOS and tvOS.
+/// Starting with version 9.0.0, App Hangs V2 is enabled by default.
 /// The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking

(I didn't do a GitHub suggestion, as the result looked a bit weird in formatting)

/// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2
/// </remarks>
[Obsolete("Use EnableAppHangTracking")]
public bool EnableAppHangTrackingV2 { get; set; } = false;
Copy link
Member

Choose a reason for hiding this comment

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

question: forward to EnableAppHangTracking

Since has no effect anymore,
shall we "forward" it to EnableAppHangTracking?
Like

public bool EnableAppHangTrackingV2 { get => EnableAppHangTracking; set => EnableAppHangTracking = value; }

Or do we indeed want to make this option essentially no-op, since this option is now Obsolete.
In this case, I'd make the message more clear:

[Obsolete("This option has no effect. Use EnableAppHangTracking instead.")]
//or maybe
[Obsolete("App Hangs V2 is now the default. Use EnableAppHangTracking instead.")]

or something similar.

I'm a bit uncertain whether we should

  • make EnableAppHangTrackingV2 no-op
  • make EnableAppHangTrackingV2 an alias to EnableAppHangTracking

Considering that we are releasing the Cocoa SDK major version in a minor .NET SDK version,
what is the "least breaking" option?

Also considering all combinations/permutations, that the user might have:

options.EnableAppHangTracking = true|false:
options.EnableAppHangTrackingV2 = true|false;

I'm quite uncertain, I'm afraid.

/// <remarks>
/// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/
/// </remarks>
public bool EnableAppHangTracking { get; set; } = false;
Copy link
Member

Choose a reason for hiding this comment

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

question: default to true?

See https://docs.sentry.io/platforms/apple/configuration/app-hangs/:

Starting with version 8.0.0, this feature has been enabled by default.

But also considering, that we are releasing this changeset as a minor version,
perhaps we do not want to change the default yet,
but instead open an issue to align the default with our v7 end of the year.

Or ... to we want to keep this default to false in general?

options.IdleTimeout = IdleTimeout ?? options.IdleTimeout;
options.EnableAppHangTracking = EnableAppHangTracking ?? options.EnableAppHangTracking;
#pragma warning disable CS0618 // Type or member is obsolete
options.EnableAppHangTrackingV2 = EnableAppHangTrackingV2 ?? options.EnableAppHangTrackingV2;
Copy link
Member

Choose a reason for hiding this comment

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

question: obsolete

Should we mark this option (BindableSentryOptions.EnableAppHangTrackingV2) also as obsolete?
Or is that not necessary as this type is internal, and we won't "forget" to remove it for our next major.

/// <remarks>
/// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2
/// </remarks>
[Obsolete("Use EnableAppHangTracking")]
Copy link
Member

Choose a reason for hiding this comment

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

question: v7?

Do we plan to remove this option for our next major - v7 - in November 2026?
Shall we create an issue already, and mark it for "Major v7" in Linear?

@bruno-garcia bruno-garcia force-pushed the deps/modules/sentry-cocoa.properties branch from f4ed890 to 117130f Compare January 24, 2026 03:28
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.

5 participants