-
Notifications
You must be signed in to change notification settings - Fork 265
Fix crash in extensions #499
Fix crash in extensions #499
Conversation
@@ -1053,7 +1054,7 @@ - (void)triggerDelayedProcessing { | |||
*/ | |||
- (void)invokeDelayedProcessing { | |||
#if !defined (HOCKEYSDK_CONFIGURATION_ReleaseCrashOnlyExtensions) | |||
if ([BITHockeyHelper applicationState] != BITApplicationStateActive) { | |||
if (!bit_isRunningInAppExtension() && [BITHockeyHelper applicationState] != BITApplicationStateActive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this necessary? [BITHockeyHelper applicationState]
contains checks if it runs in an app extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applicationState returns BITApplicationStateUnknown if running in extension and thus returning from this immediately and preventing from processing crashes
|
||
- [BUGFIX] Fixes a critical bug that would cause apps to freeze when calling `trackEvent` in UIApplicationDelegate callbacks. [#492](/~https://github.com/bitstadium/HockeySDK-iOS/pull/493) | ||
- [BUGFIX] Fix a critical bug in the crashonly variant of the SDK. [#49](/~https://github.com/bitstadium/HockeySDK-iOS/pull/494) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's really odd that this is displayed as a change while it's already in develop.
@@ -556,6 +556,7 @@ - (void) registerObservers { | |||
self.didLogLowMemoryWarning = YES; | |||
} | |||
}); | |||
dispatch_resume(source); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we need that here. Can you explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this because dispatch_source_create creates source in a suspended state and we must call at some point after creation dispatch_resume. https://developer.apple.com/documentation/dispatch/1385630-dispatch_source_create?language=objc
Fixes bitstadium/HockeySDK-Xamarin#111