Skip to content
Open
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
811ed51
docs: map existing codebase
itaybre Feb 13, 2026
10c5625
docs: initialize project
itaybre Feb 13, 2026
19fc5ab
chore: add project config
itaybre Feb 13, 2026
2065270
docs: define v1 requirements
itaybre Feb 13, 2026
2bf41d4
docs: create roadmap (5 phases)
itaybre Feb 13, 2026
ad95b86
docs(phase-01): research facade design domain
itaybre Feb 13, 2026
8356b89
docs(01-facade-design-implementation): create phase plan
itaybre Feb 13, 2026
a0ba83e
feat(01-facade-design-implementation): create SentryCrashBridge facad…
itaybre Feb 13, 2026
02debdd
docs(01-facade-design-implementation): complete 01-01-PLAN.md
itaybre Feb 13, 2026
22d7fd2
feat(01-facade-design-implementation): integrate SentryCrashBridge in…
itaybre Feb 13, 2026
f06b523
test(01-facade-design-implementation): add missing protocol conforman…
itaybre Feb 13, 2026
708b69a
docs(01-facade-design-implementation): complete 01-02-PLAN.md
itaybre Feb 13, 2026
55434e2
docs(phase-1): complete phase execution
itaybre Feb 13, 2026
5d6fb07
docs(02-swift-isolation): research Swift dependency injection and bri…
itaybre Feb 13, 2026
48f185b
docs(02-swift-isolation): create phase plan with 2 plans in wave 1
itaybre Feb 13, 2026
7bee0d1
feat(02-swift-isolation): inject bridge into SentryCrashWrapper
itaybre Feb 13, 2026
d74a3f2
test(02-swift-isolation): update tests for bridge parameter
itaybre Feb 13, 2026
d658ec1
feat(02-swift-isolation): inject bridge into SentryCrashIntegrationSe…
itaybre Feb 13, 2026
4e63349
docs(02-swift-isolation): complete 02-01-PLAN.md execution
itaybre Feb 13, 2026
51aa2e7
docs(02-swift-isolation): complete 02-02-PLAN.md
itaybre Feb 13, 2026
11bea7e
docs(phase-2): complete phase execution
itaybre Feb 13, 2026
bb18a7f
docs(03-objc-isolation): research phase domain
itaybre Feb 13, 2026
eef3e2b
docs(03-objc-isolation): create phase plans
itaybre Feb 13, 2026
5c86043
feat(03-03): eliminate container refs from SentryCrashWrapper
itaybre Feb 13, 2026
96df891
docs(03-03): complete eliminate container refs plan
itaybre Feb 13, 2026
cf45971
feat(03-objc-isolation): add bridge property to SentryCrash
itaybre Feb 13, 2026
9cd8332
feat(03-objc-isolation): wire bridge from SentryCrashIntegration to S…
itaybre Feb 13, 2026
d59ab2a
feat(03-objc-isolation): inject bridge into NSException monitor
itaybre Feb 13, 2026
599ee7b
docs(03-objc-isolation): complete 03-01 plan
itaybre Feb 13, 2026
4090604
feat(03-02): add bridge property to SentryCrashInstallation base class
itaybre Feb 13, 2026
b3301dc
feat(03-02): inject bridge into SentryCrashInstallation from SentryCr…
itaybre Feb 13, 2026
648f2a2
docs(03-02): complete SentryCrashInstallation bridge injection plan
itaybre Feb 13, 2026
5455e0f
docs(phase-03): complete phase execution
itaybre Feb 24, 2026
039641b
docs(04-verification): create phase plan
itaybre Feb 24, 2026
4abc6c5
docs(04-verification): create verification phase plan
itaybre Feb 24, 2026
81c5db6
plan(phase-5): add documentation plan for SentryCrashBridge facade pa…
itaybre Feb 24, 2026
16cc298
Remove planning docs
itaybre Feb 24, 2026
806596e
refactor(SentryDependencyContainer): implement lazy initialization fo…
itaybre Feb 24, 2026
a7bbc9c
Run format
itaybre Mar 10, 2026
f97754b
docs(SentryCrashBridge): enhance documentation for SentryCrashBridge …
itaybre Mar 10, 2026
cbb6d35
fix(SentryCrashWrapper): enable system monitor before reading systemI…
itaybre Mar 10, 2026
04d2f72
fix(SentryCrash): set NSException bridge before installation to ensur…
itaybre Mar 10, 2026
df19413
Make SentryCrashBridge non null
itaybre Mar 12, 2026
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
23 changes: 16 additions & 7 deletions Sources/Sentry/include/SentryCrash.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#import "SentryCrashReportWriter.h"
#import "SentryDefines.h"

@class SentryCrashBridge;

typedef enum {
SentryCrashDemangleLanguageNone = 0,
SentryCrashDemangleLanguageCPlusPlus = 1,
Expand All @@ -43,7 +45,9 @@ typedef enum {
SentryCrashCDeleteAlways
} SentryCrashCDeleteBehavior;

static NSString *const SENTRYCRASH_REPORT_ATTACHMENTS_ITEM = @"attachments";
static NSString *_Nonnull const SENTRYCRASH_REPORT_ATTACHMENTS_ITEM = @"attachments";

NS_ASSUME_NONNULL_BEGIN

/**
* Reports any crashes that occur in the application.
Expand All @@ -57,18 +61,21 @@ static NSString *const SENTRYCRASH_REPORT_ATTACHMENTS_ITEM = @"attachments";
SENTRY_NO_INIT

/** Init SentryCrash instance with custom base path. */
- (instancetype)initWithBasePath:(NSString *)basePath NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithBasePath:(nullable NSString *)basePath NS_DESIGNATED_INITIALIZER;

/** Cache directory base path. */
@property (nonatomic, readwrite, retain) NSString *basePath;

/** Bridge to SDK services (notification center, date provider, crash reporter). */
@property (nonatomic, strong, nullable) SentryCrashBridge *bridge;

/** A dictionary containing any info you'd like to appear in crash reports. Must
* contain only JSON-safe data: NSString for keys, and NSDictionary, NSArray,
* NSString, NSDate, and NSNumber for values.
*
* Default: nil
*/
@property (atomic, readwrite, retain) NSDictionary *userInfo;
@property (atomic, readwrite, retain, nullable) NSDictionary *userInfo;

/** What to do after sending reports via sendAllReportsWithCompletion:
*
Expand Down Expand Up @@ -110,7 +117,7 @@ SENTRY_NO_INIT
*
* Default: nil
*/
@property (nonatomic, readwrite, retain) NSArray *doNotIntrospectClasses;
@property (nonatomic, readwrite, retain, nullable) NSArray *doNotIntrospectClasses;

/** The maximum number of reports allowed on disk before old ones get deleted.
*
Expand All @@ -125,7 +132,7 @@ SENTRY_NO_INIT
* Note: If you use an installation, it will automatically set this property.
* Do not modify it in such a case.
*/
@property (nonatomic, readwrite, retain) id<SentryCrashReportFilter> sink;
@property (nonatomic, readwrite, retain, nullable) id<SentryCrashReportFilter> sink;

/** C Function to call during a crash report to give the callee an opportunity
* to add to the report. NULL = ignore.
Expand All @@ -136,7 +143,7 @@ SENTRY_NO_INIT
* Note: If you use an installation, it will automatically set this property.
* Do not modify it in such a case.
*/
@property (nonatomic, readwrite, assign) SentryCrashReportWriteCallback onCrash;
@property (nonatomic, readwrite, assign, nullable) SentryCrashReportWriteCallback onCrash;

/** Print the previous app run log to the console when installing SentryCrash.
* This is primarily for debugging purposes.
Expand All @@ -149,7 +156,7 @@ SENTRY_NO_INIT

/** Exposes the uncaughtExceptionHandler if set from SentryCrash. Is nil if
* debugger is running. **/
@property (nonatomic, assign) NSUncaughtExceptionHandler *uncaughtExceptionHandler;
@property (nonatomic, assign, nullable) NSUncaughtExceptionHandler *uncaughtExceptionHandler;

#pragma mark - Information -

Expand Down Expand Up @@ -241,6 +248,8 @@ SENTRY_NO_INIT

@end

NS_ASSUME_NONNULL_END

//! Project version number for SentryCrashFramework.
FOUNDATION_EXPORT const double SentryCrashFrameworkVersionNumber;

Expand Down
6 changes: 6 additions & 0 deletions Sources/Sentry/include/SentryCrashInstallation.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryCrashBridge;

/**
* Crash system installation which handles backend-specific details.
*
Expand Down Expand Up @@ -60,6 +62,10 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)sendAllReportsWithCompletion:(nullable SentryCrashReportFilterCompletion)onCompletion;

/** Bridge for accessing SDK services without dependency container.
* Set by SentryCrashIntegration before installation. */
@property (nonatomic, strong, nullable) SentryCrashBridge *bridge;

@end

NS_ASSUME_NONNULL_END
8 changes: 4 additions & 4 deletions Sources/SentryCrash/Installations/SentryCrashInstallation.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ - (id)initWithRequiredProperties:(NSArray *)requiredProperties

- (void)dealloc
{
SentryCrashSwift *handler = SentryDependencyContainer.sharedInstance.crashReporter;
SentryCrashSwift *handler = self.bridge.crashReporter;
@synchronized(handler) {
if (g_crashHandlerData == self.crashHandlerData) {
g_crashHandlerData = NULL;
Expand Down Expand Up @@ -162,7 +162,7 @@ - (NSArray *)makeKeyPaths:(NSArray *)keyPaths

- (void)install:(NSString *)customCacheDirectory
{
SentryCrashSwift *handler = SentryDependencyContainer.sharedInstance.crashReporter;
SentryCrashSwift *handler = self.bridge.crashReporter;
@synchronized(handler) {
handler.basePath = customCacheDirectory;
g_crashHandlerData = self.crashHandlerData;
Expand All @@ -173,7 +173,7 @@ - (void)install:(NSString *)customCacheDirectory

- (void)uninstall
{
SentryCrashSwift *handler = SentryDependencyContainer.sharedInstance.crashReporter;
SentryCrashSwift *handler = self.bridge.crashReporter;
@synchronized(handler) {
if (g_crashHandlerData == self.crashHandlerData) {
g_crashHandlerData = NULL;
Expand Down Expand Up @@ -204,7 +204,7 @@ - (void)sendAllReportsWithCompletion:(SentryCrashReportFilterCompletion)onComple

sink = [SentryCrashReportFilterPipeline filterWithFilters:sink, nil];

SentryCrashSwift *handler = SentryDependencyContainer.sharedInstance.crashReporter;
SentryCrashSwift *handler = self.bridge.crashReporter;
handler.sink =
[[SentryCrashReportFilterSwift alloc] initWithFilterReports:^(NSArray *_Nonnull array,
void (^_Nonnull completion)(NSArray *_Nullable, BOOL, NSError *_Nullable)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,24 @@
#ifndef HDR_SentryCrashMonitor_NSException_h
#define HDR_SentryCrashMonitor_NSException_h

#ifdef __OBJC__
@class SentryCrashBridge;
#endif

#ifdef __cplusplus
extern "C" {
#endif

#include "SentryCrashMonitor.h"

#ifdef __OBJC__
/** Set the bridge for accessing SDK services. Must be called before enabling the monitor. */
void sentrycrashcm_nsexception_setBridge(SentryCrashBridge *_Nullable bridge);
#endif

/** Access the Monitor API.
*/
SentryCrashMonitorAPI *sentrycrashcm_nsexception_getAPI(void);
SentryCrashMonitorAPI *_Nonnull sentrycrashcm_nsexception_getAPI(void);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
/** The exception handler that was in place before we installed ours. */
static NSUncaughtExceptionHandler *g_previousUncaughtExceptionHandler;

/** Bridge for accessing SDK services. */
static SentryCrashBridge *g_bridge = nil;

// ============================================================================
#pragma mark - Callbacks -
// ============================================================================
Expand Down Expand Up @@ -113,6 +116,12 @@
#pragma mark - API -
// ============================================================================

void
sentrycrashcm_nsexception_setBridge(SentryCrashBridge *bridge)
{
g_bridge = bridge;
}

static void
setEnabled(bool isEnabled)
{
Expand All @@ -124,8 +133,7 @@

SENTRY_LOG_DEBUG(@"Setting new handler.");
NSSetUncaughtExceptionHandler(&handleUncaughtException);
SentryDependencyContainer.sharedInstance.crashReporter.uncaughtExceptionHandler
= &handleUncaughtException;
g_bridge.crashReporter.uncaughtExceptionHandler = &handleUncaughtException;
Copy link

Choose a reason for hiding this comment

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

Nil bridge silently skips uncaught exception handler registration

High Severity

If g_bridge is nil when the NSException monitor is enabled, g_bridge.crashReporter.uncaughtExceptionHandler = &handleUncaughtException silently becomes a no-op due to ObjC nil messaging. The handler is still installed globally via NSSetUncaughtExceptionHandler, but the crash reporter's uncaughtExceptionHandler property won't be set. The previous code via SentryDependencyContainer.sharedInstance guaranteed non-nil access. No warning or error is logged for this failure.

Fix in Cursor Fix in Web

} else {
SENTRY_LOG_DEBUG(@"Restoring original handler.");
NSSetUncaughtExceptionHandler(g_previousUncaughtExceptionHandler);
Expand Down
13 changes: 9 additions & 4 deletions Sources/SentryCrash/Recording/SentryCrash.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#import "SentryCrashJSONCodecObjC.h"
#import "SentryCrashMonitorContext.h"
#import "SentryCrashMonitor_AppState.h"
#import "SentryCrashMonitor_NSException.h"
#import "SentryCrashMonitor_System.h"
#import "SentryCrashNSErrorUtil.h"
#import "SentryCrashReportFields.h"
Expand Down Expand Up @@ -76,6 +77,7 @@ @implementation SentryCrash
@synthesize onCrash = _onCrash;
@synthesize bundleName = _bundleName;
@synthesize basePath = _basePath;
@synthesize bridge = _bridge;
@synthesize introspectMemory = _introspectMemory;
@synthesize doNotIntrospectClasses = _doNotIntrospectClasses;
@synthesize demangleLanguages = _demangleLanguages;
Expand Down Expand Up @@ -234,9 +236,12 @@ - (BOOL)install
return false;
}

// Set bridge for NSException monitor before enabling monitors
sentrycrashcm_nsexception_setBridge(self.bridge);

#if SENTRY_HAS_UIKIT
id<SentryNSNotificationCenterWrapper> notificationCenter
= SentryDependencyContainer.sharedInstance.notificationCenterWrapper;
= self.bridge.notificationCenterWrapper;
[notificationCenter addObserver:self
selector:@selector(applicationDidBecomeActive)
name:UIApplicationDidBecomeActiveNotification
Expand All @@ -260,7 +265,7 @@ - (BOOL)install
#endif // SENTRY_HAS_UIKIT
#if SENTRY_HAS_NSEXTENSION
id<SentryNSNotificationCenterWrapper> notificationCenter
= SentryDependencyContainer.sharedInstance.notificationCenterWrapper;
= self.bridge.notificationCenterWrapper;
[notificationCenter addObserver:self
selector:@selector(applicationDidBecomeActive)
name:NSExtensionHostDidBecomeActiveNotification
Expand Down Expand Up @@ -292,7 +297,7 @@ - (void)uninstall

#if SENTRY_HAS_UIKIT
id<SentryNSNotificationCenterWrapper> notificationCenter
= SentryDependencyContainer.sharedInstance.notificationCenterWrapper;
= self.bridge.notificationCenterWrapper;
[notificationCenter removeObserver:self
name:UIApplicationDidBecomeActiveNotification
object:nil];
Expand All @@ -309,7 +314,7 @@ - (void)uninstall
#endif // SENTRY_HAS_UIKIT
#if SENTRY_HAS_NSEXTENSION
id<SentryNSNotificationCenterWrapper> notificationCenter
= SentryDependencyContainer.sharedInstance.notificationCenterWrapper;
= self.bridge.notificationCenterWrapper;
[notificationCenter removeObserver:self
name:NSExtensionHostDidBecomeActiveNotification
object:nil];
Expand Down
1 change: 0 additions & 1 deletion Sources/Swift/Helper/Dependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
}()
@objc public static let dispatchQueueWrapper = SentryDispatchQueueWrapper()
@objc public static let notificationCenterWrapper: SentryNSNotificationCenterWrapper = NotificationCenter.default
@objc public static let crashWrapper = SentryCrashWrapper(processInfoWrapper: Dependencies.processInfoWrapper)
@objc public static let binaryImageCache = SentryBinaryImageCache()
@objc public static let debugImageProvider = SentryDebugImageProvider()
@objc public static let sysctlWrapper = SentrySysctl()
Expand Down
68 changes: 68 additions & 0 deletions Sources/Swift/Integrations/SentryCrash/SentryCrashBridge.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// swiftlint:disable missing_docs
@_implementationOnly import _SentryPrivate
import Foundation

#if (os(iOS) || os(tvOS)) && !SENTRY_NO_UI_FRAMEWORK
import UIKit
#endif

/**
* Concrete facade bridging SDK services to SentryCrash without requiring direct
* SentryDependencyContainer access.
*
* This class provides a single point of access for SentryCrash to SDK services,
* decoupling the crash reporting subsystem from the SDK's dependency container.
* It exposes only the five services SentryCrash needs: notification center wrapper,
* date provider, crash reporter, uncaught exception handler, and active screen size.
*
* The bridge follows the facade pattern established in the codebase, similar to
* SentryDependencyContainerSwiftHelper, providing a clean architectural boundary
* between layers.
*/
@objc @_spi(Private) public final class SentryCrashBridge: NSObject {
Copy link
Member

Choose a reason for hiding this comment

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

h: I am not convinced of this architectural approach. SentryCrash is a library which was vendored in, so from a user perspective the dependency graph is App > SentrySDK > SentryCrash. But this bridge is now a link from SentryCrash > SentrySDK instead. Instead I believe it would make more sense to use protocols which are defined in SentryCrash and need to be injected by our SDK, or we use a delegate/callback pattern. I am thinking about how the architecture would look like if SentryCrash was a separate target or even an external package, and the SentryNSNotificationCenterWrapper would not be in that package but in ours.

Copy link
Member

@philipphofmann philipphofmann Mar 11, 2026

Choose a reason for hiding this comment

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

I agree.

I would approach this by defining Swift protocols that describe the interaction between the Cocoa SDK and the crash reporting component / SentryCrash.

These protocols should provide a generic crash-reporting interface without exposing SentryCrash-specific concepts. The Cocoa SDK would depend only on these protocols.

We then introduce an adapter that implements the protocol and translates the generic crash reporting interface to SentryCrash. Ideally, this keeps changes inside SentryCrash minimal and avoids it needing to be aware that it runs inside Sentry Cocoa. Another significant reason for not making too many changes in SentryCrash is that we can port changes and fixes from KSCrash back to SentryCrash. The more we modify SentryCrash, the more it deviates from KSCrash, and the harder it will be to migrate changes back or to do a potential switch. Which then also applies to any other crash reporter that we might use in the future.

Conceptually:

Cocoa SDK → Crash Reporting Protocol → SentryCrashReportAdapter → SentryCrash

Ideally, when you then swap out SentryCrash, for example, with KSCrash, you would only need to write a new adapter, but you don't need to change the crash reporting protocol. But I think it's okay if we're not fully there yet, because making that actually work is quite some effort. I think the main goal should be to have clear boundaries and make an optional switch in the future easier. If we, at some point, actually switch out the crash report with another one, for example, also on Swift Server only for Linux, it's acceptable to maybe have to adapt the protocol slightly, but it should not be too much effort.

And coming back to what Phil said about SentryCrash being an external package, I think we should work towards that goal. When you could theoretically move SentryCrash into its own target or external package, we know we achieved this goal because the dependencies would be only from the Cocoa SDK to SentryCrash, not the other way around.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I definitely agree with that, I wanted to make a slow approach towards the protocol approach.
This was the first step:

  • Remove SentryDependencyContainer uses
    • With this we have a better idea of what SentryCrash needs to use
  • Create the interfaces / protocols (probably bigger than just the bridge here)

The PR title may have been misleading, this doesn't reach full isolation yet


// MARK: - Service Properties

/// Notification center wrapper for app lifecycle events
@objc public let notificationCenterWrapper: SentryNSNotificationCenterWrapper

/// Date provider for timestamps and system time
@objc public let dateProvider: SentryCurrentDateProvider

/// Crash reporter for system info and crash state
@objc public let crashReporter: SentryCrashSwift

/// Uncaught exception handler (bridges to crashReporter's property)
@objc public var uncaughtExceptionHandler: (@convention(c) (NSException) -> Void)? {
get { crashReporter.uncaughtExceptionHandler }
set { crashReporter.uncaughtExceptionHandler = newValue }
}

// MARK: - Platform-Specific Services

#if (os(iOS) || os(tvOS)) && !SENTRY_NO_UI_FRAMEWORK
/// Returns the active screen dimensions (iOS/tvOS only)
@objc public func activeScreenSize() -> CGSize {
return SentryDependencyContainerSwiftHelper.activeScreenSize()
}
#endif

// MARK: - Initialization

/// Initializes the bridge with required SDK services
/// - Parameters:
/// - notificationCenterWrapper: Wrapper for notification center operations
/// - dateProvider: Provider for current date and time operations
/// - crashReporter: Crash reporting service
@objc public init(
notificationCenterWrapper: SentryNSNotificationCenterWrapper,
dateProvider: SentryCurrentDateProvider,
crashReporter: SentryCrashSwift
) {
self.notificationCenterWrapper = notificationCenterWrapper
self.dateProvider = dateProvider
self.crashReporter = crashReporter
super.init()
}
}
// swiftlint:enable missing_docs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public func sentry_finishAndSaveTransaction() {
// MARK: - Dependency Provider

/// Provides dependencies for `SentryCrashIntegration`.
typealias CrashIntegrationProvider = SentryCrashReporterProvider & CrashIntegrationSessionHandlerBuilder & CrashInstallationReporterBuilder
typealias CrashIntegrationProvider = SentryCrashReporterProvider & CrashIntegrationSessionHandlerBuilder & CrashInstallationReporterBuilder & DateProviderProvider & NotificationCenterProvider

// MARK: - SentryCrashIntegration

Expand All @@ -33,6 +33,7 @@ final class SentryCrashIntegration<Dependencies: CrashIntegrationProvider>: NSOb
private var scopeObserver: SentryCrashScopeObserver?
private var crashReporter: SentryCrashSwift
private var installation: SentryCrashInstallationReporter?
private var bridge: SentryCrashBridge?

// MARK: - Initialization

Expand All @@ -48,7 +49,18 @@ final class SentryCrashIntegration<Dependencies: CrashIntegrationProvider>: NSOb

super.init()

self.sessionHandler = dependencies.getCrashIntegrationSessionBuilder(options)
// Create facade before installing crash handler to ensure services are available
let bridge = SentryCrashBridge(
notificationCenterWrapper: dependencies.notificationCenterWrapper,
dateProvider: dependencies.dateProvider,
crashReporter: dependencies.crashReporter
)
self.bridge = bridge

// Inject bridge into crash reporter so ObjC SentryCrash can access it
crashReporter.setBridge(bridge)

self.sessionHandler = dependencies.getCrashIntegrationSessionBuilder(options, bridge: bridge)
self.scopeObserver = SentryCrashScopeObserver(maxBreadcrumbs: Int(options.maxBreadcrumbs))

guard self.sessionHandler != nil, self.scopeObserver != nil else {
Expand Down Expand Up @@ -122,6 +134,8 @@ final class SentryCrashIntegration<Dependencies: CrashIntegrationProvider>: NSOb
}

self.installation = dependencies.getCrashInstallationReporter(options)
// Inject bridge into installation so it can access crashReporter
installation?.setValue(bridge, forKey: "bridge")
canSendReports = true
}

Expand Down
Loading
Loading