Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Features

- Promote `enableStandaloneAppStartTracing` from `options.experimental` to a top-level option on `Options` (#8715)
- Add experimental option `enableUIViewControllerInitSwizzling` that defers `UIViewController` swizzling to first instantiation instead of eagerly discovering and swizzling all subclasses at SDK start. This avoids realizing `@available`-gated `UIViewController` subclasses on OS versions below their gate, which crashes apps on start (#8687).

### Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
options.enableUserInteractionTracing = !isBenchmarking && !SentrySDKOverrides.UIEventTracking.disableTracing.boolValue

options.enablePreWarmedAppStartTracing = !isBenchmarking && !SentrySDKOverrides.AppStart.disablePrewarmedTracing.boolValue
options.experimental.enableStandaloneAppStartTracing = SentrySDKOverrides.AppStart.enableStandaloneTracing.boolValue
options.enableStandaloneAppStartTracing = SentrySDKOverrides.AppStart.enableStandaloneTracing.boolValue
options.enableUIViewControllerTracing = !SentrySDKOverrides.UIViewControllerTracing.disable.boolValue
options.experimental.enableUIViewControllerInitSwizzling = SentrySDKOverrides.UIViewControllerTracing.enableInitSwizzling.boolValue

Expand Down Expand Up @@ -410,27 +410,27 @@
var layoutOffset: UIOffset { UIOffset(horizontal: 25, vertical: 75) }

func configureFeedbackWidget(config: SentryUserFeedbackWidgetConfiguration) {
config.autoInject = false

Check warning on line 413 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'autoInject' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 413 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'autoInject' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 413 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'autoInject' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 413 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'autoInject' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
config.layoutUIOffset = layoutOffset

Check warning on line 414 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'layoutUIOffset' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 414 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'layoutUIOffset' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 414 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'layoutUIOffset' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 414 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'layoutUIOffset' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

guard !SentrySDKOverrides.Feedback.allDefaults.boolValue else { return }

if Locale.current.languageCode == "ar" { // arabic
config.labelText = "﷽"

Check warning on line 419 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 419 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 419 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 419 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
} else if Locale.current.languageCode == "ur" { // urdu
config.labelText = "نستعلیق"
} else if Locale.current.languageCode == "he" { // hebrew
config.labelText = "עִבְרִית‎"

Check warning on line 423 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 423 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 423 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 423 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
} else if Locale.current.languageCode == "hi" { // Hindi
config.labelText = "नागरि"
} else {
config.labelText = "Report Jank"

Check warning on line 427 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 427 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 427 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 427 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
}

if SentrySDKOverrides.Feedback.noWidgetText.boolValue {
config.labelText = nil

Check warning on line 431 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 431 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 431 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 431 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'labelText' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
}
config.showIcon = !SentrySDKOverrides.Feedback.noWidgetIcon.boolValue

Check warning on line 433 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'showIcon' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 433 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'showIcon' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 433 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'showIcon' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 433 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'showIcon' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
}

func configureFeedbackForm(config: SentryUserFeedbackFormConfiguration) {
Expand Down Expand Up @@ -481,7 +481,7 @@
guard !args.contains(SentrySDKOverrides.Feedback.allDefaults.rawValue) else {
#if !SDK_V10
if shouldConfigureDeprecatedWidget {
config.configureWidget = configureFeedbackWidget(config:)

Check warning on line 484 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 484 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 484 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 484 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
}
#endif // !SDK_V10
configureHooks(config: config)
Expand All @@ -493,7 +493,7 @@
config.showFormForScreenshots = !SentrySDKOverrides.Feedback.noScreenshots.boolValue
#if !SDK_V10
if shouldConfigureDeprecatedWidget {
config.configureWidget = configureFeedbackWidget(config:)

Check warning on line 496 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 496 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 496 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.

Check warning on line 496 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'configureWidget' is deprecated: The Sentry-managed User Feedback widget is deprecated and will be removed in v10. Present the feedback form from your own UI using SentrySDK.feedback.show(), SentrySDK.FeedbackForm, or sentryFeedback(isPresented:) instead.
}
#endif // !SDK_V10
config.configureForm = configureFeedbackForm(config:)
Expand All @@ -502,7 +502,7 @@

#if !SDK_V10
if SentrySDKOverrides.Feedback.useCustomFeedbackButton.boolValue {
config.customButton = feedbackButton

Check warning on line 505 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI Debug

setter for 'customButton' is deprecated: The custom User Feedback button configuration is deprecated and will be removed in v10. Add your own button action and call SentrySDK.feedback.show() instead.

Check warning on line 505 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample SessionReplay-CameraTest Debug

setter for 'customButton' is deprecated: The custom User Feedback button configuration is deprecated and will be removed in v10. Add your own button action and call SentrySDK.feedback.show() instead.

Check warning on line 505 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-ObjectiveC Debug

setter for 'customButton' is deprecated: The custom User Feedback button configuration is deprecated and will be removed in v10. Add your own button action and call SentrySDK.feedback.show() instead.

Check warning on line 505 in Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-Swift Debug

setter for 'customButton' is deprecated: The custom User Feedback button configuration is deprecated and will be removed in v10. Add your own button action and call SentrySDK.feedback.show() instead.
}
#endif // !SDK_V10
}
Expand Down
7 changes: 7 additions & 0 deletions Sources/SentryObjC/Public/SentryObjCOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic) BOOL enablePreWarmedAppStartTracing;

/**
* When enabled, the SDK sends a standalone app start transaction instead of attaching app
* start data to the first UIViewController transaction.
* @note Default value is @c NO.
*/
@property (nonatomic) BOOL enableStandaloneAppStartTracing;

/**
* When enabled, the SDK reports non-fully-blocking app hangs. A non-fully-blocking app hang is
* when the app appears stuck to the user but can still render a few frames.
Expand Down
5 changes: 5 additions & 0 deletions Sources/SentryObjCCompat/SentryObjCOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ import Foundation
set { wrapped.enablePreWarmedAppStartTracing = newValue }
}

@objc public var enableStandaloneAppStartTracing: Bool {
get { wrapped.enableStandaloneAppStartTracing }
set { wrapped.enableStandaloneAppStartTracing = newValue }
}

@objc public var enableReportNonFullyBlockingAppHangs: Bool {
get { wrapped.enableReportNonFullyBlockingAppHangs }
set { wrapped.enableReportNonFullyBlockingAppHangs = newValue }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
if options.enableMetrics {
features.append("metrics")
}
if options.experimental.enableStandaloneAppStartTracing {
if options.enableStandaloneAppStartTracing {

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build SPM watchOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build SPM macOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Lint

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build V10 watchOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build V10 macOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build v10 with KSCrash watchOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Test v10 with KSCrash macOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (DebugWithoutUIKit)

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Test V10 macOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / macOS CLI (NoUIFramework) builds and has no AppKit/UIKit

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Check AppKit linkage (Release)

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build v10 with KSCrash macOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build with SPM

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / watchos

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / xros

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / iphonesimulator

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build SentryObjC Slices / watchos

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build SentryObjC Slices / macosx

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Sample macOS-Swift Debug

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (ReleaseWithoutUIKit)

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Check no AppKit linkage (ReleaseWithoutUIKit)

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Test V10 with Test Server

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Sample macOS-SwiftUI Debug

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Sample SPM watchOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Sample SPM macOS

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Unit macOS 14 Sentry / Unit macOS 14 Sentry

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Unit macOS 15 Sentry / Unit macOS 15 Sentry

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Build XCFrameworks

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Unit macOS 26 Sentry / Unit macOS 26 Sentry

value of type 'Options' has no member 'enableStandaloneAppStartTracing'

Check failure on line 55 in Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

View workflow job for this annotation

GitHub Actions / Unit with Test Server macOS 15

value of type 'Options' has no member 'enableStandaloneAppStartTracing'
features.append("standaloneAppStartTracing")
}
Comment on lines +55 to 57

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: Unconditional access to enableStandaloneAppStartTracing will cause a compilation error on macOS and watchOS.
Severity: HIGH

Suggested Fix

Wrap the access to options.enableStandaloneAppStartTracing in SentryEnabledFeaturesBuilder.swift with the same platform-specific conditional compilation block used for its definition: #if (os(iOS) || os(tvOS) || os(visionOS)) && !SENTRY_NO_UI_FRAMEWORK.

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: Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift#L55-L57

Potential issue: The property `enableStandaloneAppStartTracing` is defined within a
conditional compilation block for iOS, tvOS, and visionOS only in `Options.swift`.
However, the code in `SentryEnabledFeaturesBuilder.swift` accesses this property
unconditionally. This will lead to a compilation error when building for other platforms
supported by the SDK, such as macOS or watchOS, because the property will not exist on
the `Options` object for those targets.

Also affects:

  • Sources/Swift/Options.swift:352~352

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

if options.experimental.enableWatchdogTerminationsV2 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Swift/Helper/SentrySDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ extension SentrySDK {
/// func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
/// SentrySDK.start(configureOptions: { options in
/// ...
/// options.experimental.enableStandaloneAppStartTracing = true
/// options.enableStandaloneAppStartTracing = true
/// })
/// SentrySDK.extendAppStart()
///
Expand Down
6 changes: 6 additions & 0 deletions Sources/Swift/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@
/// @note Default value is @c true.
@objc public var enablePreWarmedAppStartTracing: Bool = true

/// When enabled, the SDK sends a standalone app start transaction instead of attaching app
/// start data to the first UIViewController transaction.
///
/// @note Default value is @c false.
@objc public var enableStandaloneAppStartTracing: Bool = false

/// When enabled the SDK reports non-fully-blocking app hangs. A non-fully-blocking app hang is when
/// the app appears stuck to the user but can still render a few frames.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/Swift/SentryDependencyContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ extension SentryFileManager: SentryFileManagerProtocol { }
appStateManager: appStateManager,
framesTracker: framesTracker,
enablePreWarmedAppStartTracing: options.enablePreWarmedAppStartTracing,
enableStandaloneAppStartTracing: options.experimental.enableStandaloneAppStartTracing,
enableStandaloneAppStartTracing: options.enableStandaloneAppStartTracing,
dateProvider: dateProvider,
sysctlWrapper: sysctlWrapper,
appStartInfoProvider: appStartInfoProvider,
Expand Down
6 changes: 0 additions & 6 deletions Sources/Swift/SentryExperimentalOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ public final class SentryExperimentalOptions: NSObject {
/// When enabled, the SDK uses a more efficient mechanism for detecting watchdog terminations.
public var enableWatchdogTerminationsV2 = false

/**
* When enabled, the SDK sends a standalone app start transaction instead of attaching app
* start data to the first UIViewController transaction.
*/
public var enableStandaloneAppStartTracing = false

/**
* Reduces SDK start overhead by swizzling each `UIViewController` subclass lazily, the first
* time an instance of it is created, instead of eagerly discovering and swizzling every
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ final class SentryEnabledFeaturesBuilderTests: XCTestCase {
func testEnableStandaloneAppStartTracing_isEnabled_shouldAddFeature() throws {
// -- Arrange --
let options = Options()
options.experimental.enableStandaloneAppStartTracing = true
options.enableStandaloneAppStartTracing = true

// -- Act --
let features = SentryEnabledFeaturesBuilder.getEnabledFeatures(options: options)
Expand All @@ -320,7 +320,7 @@ final class SentryEnabledFeaturesBuilderTests: XCTestCase {
func testEnableStandaloneAppStartTracing_isDisabled_shouldNotAddFeature() throws {
// -- Arrange --
let options = Options()
options.experimental.enableStandaloneAppStartTracing = false
options.enableStandaloneAppStartTracing = false

// -- Act --
let features = SentryEnabledFeaturesBuilder.getEnabledFeatures(options: options)
Expand Down
152 changes: 76 additions & 76 deletions sdk_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -24380,6 +24380,82 @@
"printedName": "enableSpotlight",
"usr": "c:@M@Sentry@objc(cs)SentryOptions(py)enableSpotlight"
},
{
"accessors": [
{
"accessorKind": "get",
"children": [
{
"kind": "TypeNominal",
"name": "Bool",
"printedName": "Swift.Bool",
"usr": "s:Sb"
}
],
"declAttributes": [
"Final",
"ObjC"
],
"declKind": "Accessor",
"implicit": true,
"kind": "Accessor",
"mangledName": "$s6Sentry7OptionsC31enableStandaloneAppStartTracingSbvg",
"moduleName": "Sentry",
"name": "Get",
"printedName": "Get()",
"usr": "c:@M@Sentry@objc(cs)SentryOptions(im)enableStandaloneAppStartTracing"
},
{
"accessorKind": "set",
"children": [
{
"kind": "TypeNominal",
"name": "Bool",
"printedName": "Swift.Bool",
"usr": "s:Sb"
},
{
"kind": "TypeNominal",
"name": "Void",
"printedName": "()"
}
],
"declAttributes": [
"Final",
"ObjC"
],
"declKind": "Accessor",
"implicit": true,
"kind": "Accessor",
"mangledName": "$s6Sentry7OptionsC31enableStandaloneAppStartTracingSbvs",
"moduleName": "Sentry",
"name": "Set",
"printedName": "Set()",
"usr": "c:@M@Sentry@objc(cs)SentryOptions(im)setEnableStandaloneAppStartTracing:"
}
],
"children": [
{
"kind": "TypeNominal",
"name": "Bool",
"printedName": "Swift.Bool",
"usr": "s:Sb"
}
],
"declAttributes": [
"Final",
"HasStorage",
"ObjC"
],
"declKind": "Var",
"hasStorage": true,
"kind": "Var",
"mangledName": "$s6Sentry7OptionsC31enableStandaloneAppStartTracingSbvp",
"moduleName": "Sentry",
"name": "enableStandaloneAppStartTracing",
"printedName": "enableStandaloneAppStartTracing",
"usr": "c:@M@Sentry@objc(cs)SentryOptions(py)enableStandaloneAppStartTracing"
},
{
"accessors": [
{
Expand Down Expand Up @@ -38652,82 +38728,6 @@
"printedName": "init()",
"usr": "c:@M@Sentry@objc(cs)SentryExperimentalOptions(im)init"
},
{
"accessors": [
{
"accessorKind": "get",
"children": [
{
"kind": "TypeNominal",
"name": "Bool",
"printedName": "Swift.Bool",
"usr": "s:Sb"
}
],
"declAttributes": [
"Final",
"ObjC"
],
"declKind": "Accessor",
"implicit": true,
"kind": "Accessor",
"mangledName": "$s6Sentry0A19ExperimentalOptionsC31enableStandaloneAppStartTracingSbvg",
"moduleName": "Sentry",
"name": "Get",
"printedName": "Get()",
"usr": "c:@M@Sentry@objc(cs)SentryExperimentalOptions(im)enableStandaloneAppStartTracing"
},
{
"accessorKind": "set",
"children": [
{
"kind": "TypeNominal",
"name": "Bool",
"printedName": "Swift.Bool",
"usr": "s:Sb"
},
{
"kind": "TypeNominal",
"name": "Void",
"printedName": "()"
}
],
"declAttributes": [
"Final",
"ObjC"
],
"declKind": "Accessor",
"implicit": true,
"kind": "Accessor",
"mangledName": "$s6Sentry0A19ExperimentalOptionsC31enableStandaloneAppStartTracingSbvs",
"moduleName": "Sentry",
"name": "Set",
"printedName": "Set()",
"usr": "c:@M@Sentry@objc(cs)SentryExperimentalOptions(im)setEnableStandaloneAppStartTracing:"
}
],
"children": [
{
"kind": "TypeNominal",
"name": "Bool",
"printedName": "Swift.Bool",
"usr": "s:Sb"
}
],
"declAttributes": [
"Final",
"HasStorage",
"ObjC"
],
"declKind": "Var",
"hasStorage": true,
"kind": "Var",
"mangledName": "$s6Sentry0A19ExperimentalOptionsC31enableStandaloneAppStartTracingSbvp",
"moduleName": "Sentry",
"name": "enableStandaloneAppStartTracing",
"printedName": "enableStandaloneAppStartTracing",
"usr": "c:@M@Sentry@objc(cs)SentryExperimentalOptions(py)enableStandaloneAppStartTracing"
},
{
"accessors": [
{
Expand Down
20 changes: 20 additions & 0 deletions sdk_api_objc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2075,6 +2075,13 @@
"returnType": "BOOL",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "enableStandaloneAppStartTracing",
"parent": "SentryObjCOptions",
"returnType": "BOOL",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "enableSwizzling",
Expand Down Expand Up @@ -5876,6 +5883,13 @@
"returnType": "void",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "setEnableStandaloneAppStartTracing:",
"parent": "SentryObjCOptions",
"returnType": "void",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "setEnableSwizzling:",
Expand Down Expand Up @@ -9128,6 +9142,12 @@
"parent": "SentryObjCOptions",
"type": "BOOL"
},
{
"kind": "ObjCPropertyDecl",
"name": "enableStandaloneAppStartTracing",
"parent": "SentryObjCOptions",
"type": "BOOL"
},
{
"kind": "ObjCPropertyDecl",
"name": "enableSwizzling",
Expand Down
20 changes: 20 additions & 0 deletions sdk_api_objc_v10.json
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,13 @@
"returnType": "BOOL",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "enableStandaloneAppStartTracing",
"parent": "SentryObjCOptions",
"returnType": "BOOL",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "enableSwizzling",
Expand Down Expand Up @@ -6026,6 +6033,13 @@
"returnType": "void",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "setEnableStandaloneAppStartTracing:",
"parent": "SentryObjCOptions",
"returnType": "void",
"instance": true
},
{
"kind": "ObjCMethodDecl",
"name": "setEnableSwizzling:",
Expand Down Expand Up @@ -9320,6 +9334,12 @@
"parent": "SentryObjCOptions",
"type": "BOOL"
},
{
"kind": "ObjCPropertyDecl",
"name": "enableStandaloneAppStartTracing",
"parent": "SentryObjCOptions",
"type": "BOOL"
},
{
"kind": "ObjCPropertyDecl",
"name": "enableSwizzling",
Expand Down
Loading
Loading