diff --git a/Bugsnag/Client/BugsnagClient.m b/Bugsnag/Client/BugsnagClient.m index 6a187b3fe..2e00b8787 100644 --- a/Bugsnag/Client/BugsnagClient.m +++ b/Bugsnag/Client/BugsnagClient.m @@ -234,11 +234,12 @@ - (void)start { // from the start method. [self.configuration validate]; + // MUST be called before BSGRunContextInit to initialize bsg_runContext + BSGCrashSentryInstall(self.configuration, BSSerializeDataCrashHandler); + // MUST be called before any code that accesses bsg_runContext BSGRunContextInit(BSGFileLocations.current.runContext); - BSGCrashSentryInstall(self.configuration, BSSerializeDataCrashHandler); - self.systemState = [[BugsnagSystemState alloc] initWithConfiguration:self.configuration]; // add metadata about app/device