3333#import " SentryCrashJSONCodecObjC.h"
3434#import " SentryCrashLogger.h"
3535#import " SentryCrashReportFilterBasic.h"
36+ #import " SentryDependencyContainer.h"
3637#import < objc/runtime.h>
3738
3839/* * Max number of properties that can be defined for writing to the report */
@@ -175,7 +176,7 @@ - (id)initWithRequiredProperties:(NSArray *)requiredProperties
175176
176177- (void )dealloc
177178{
178- SentryCrash *handler = [SentryCrash sharedInstance ] ;
179+ SentryCrash *handler = SentryDependencyContainer. sharedInstance . crashReporter ;
179180 @synchronized (handler) {
180181 if (g_crashHandlerData == self.crashHandlerData ) {
181182 g_crashHandlerData = NULL ;
@@ -260,7 +261,7 @@ - (void)setOnCrash:(SentryCrashReportWriteCallback)onCrash
260261
261262- (void )install
262263{
263- SentryCrash *handler = [SentryCrash sharedInstance ] ;
264+ SentryCrash *handler = SentryDependencyContainer. sharedInstance . crashReporter ;
264265 @synchronized (handler) {
265266 g_crashHandlerData = self.crashHandlerData ;
266267 handler.onCrash = crashCallback;
@@ -270,7 +271,7 @@ - (void)install
270271
271272- (void )uninstall
272273{
273- SentryCrash *handler = [SentryCrash sharedInstance ] ;
274+ SentryCrash *handler = SentryDependencyContainer. sharedInstance . crashReporter ;
274275 @synchronized (handler) {
275276 if (g_crashHandlerData == self.crashHandlerData ) {
276277 g_crashHandlerData = NULL ;
@@ -302,7 +303,7 @@ - (void)sendAllReportsWithCompletion:(SentryCrashReportFilterCompletion)onComple
302303
303304 sink = [SentryCrashReportFilterPipeline filterWithFilters: self .prependedFilters, sink, nil ];
304305
305- SentryCrash *handler = [SentryCrash sharedInstance ] ;
306+ SentryCrash *handler = SentryDependencyContainer. sharedInstance . crashReporter ;
306307 handler.sink = sink;
307308 [handler sendAllReportsWithCompletion: onCompletion];
308309}
0 commit comments