这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
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
13 changes: 9 additions & 4 deletions Tests/SentryTests/TestUtils/SentryTestObserver.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down