diff --git a/Tests/SentryTests/TestUtils/SentryTestObserver.m b/Tests/SentryTests/TestUtils/SentryTestObserver.m index a4fb1f95073..a58619fa81b 100644 --- a/Tests/SentryTests/TestUtils/SentryTestObserver.m +++ b/Tests/SentryTests/TestUtils/SentryTestObserver.m @@ -52,11 +52,16 @@ - (instancetype)init // The SentryCrashIntegration enriches the scope. We need to install the integration // once to get the scope data. - [SentrySDK startWithOptionsObject:options]; - self.scope = [[SentryScope alloc] init]; - [SentryCrashIntegration enrichScope:self.scope - crashWrapper:[SentryCrashWrapper sharedInstance]]; + // When running the SentryTestObserver the code gets stuck when accessing the + // UIScreen.mainScreen in SentryCrashIntegration. We disable adding extra context for now. + // Ideally we somehow check here if we can access UIScreen.mainScreen, see + // https://github.com/getsentry/sentry-cocoa/issues/2284 + // [SentrySDK startWithOptionsObject:options]; + // + // self.scope = [[SentryScope alloc] init]; + // [SentryCrashIntegration enrichScope:self.scope + // crashWrapper:[SentryCrashWrapper sharedInstance]]; self.options = options; }