Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Fix crash in extensions #499

Merged
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion Classes/BITCrashManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ - (void) registerObservers {
self.didLogLowMemoryWarning = YES;
}
});
dispatch_resume(source);
Copy link
Contributor

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?

Copy link
Contributor Author

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

});
} else {
self.appDidReceiveLowMemoryWarningObserver = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidReceiveMemoryWarningNotification
Expand Down Expand Up @@ -1053,7 +1054,7 @@ - (void)triggerDelayedProcessing {
*/
- (void)invokeDelayedProcessing {
#if !defined (HOCKEYSDK_CONFIGURATION_ReleaseCrashOnlyExtensions)
if ([BITHockeyHelper applicationState] != BITApplicationStateActive) {
if (!bit_isRunningInAppExtension() && [BITHockeyHelper applicationState] != BITApplicationStateActive) {
Copy link
Contributor

@ElektrojungeAtWork ElektrojungeAtWork Dec 15, 2017

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.

Copy link
Contributor Author

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

return;
}
#endif
Expand Down
5 changes: 5 additions & 0 deletions Documentation/Guides/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 5.1.1

- [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)

Copy link
Contributor

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.

## 5.1.0

- [FEATURE] Add Turkish localization thanks to [Ozgur](https://github.com/ozgur).[#478](https://github.com/bitstadium/HockeySDK-iOS/pull/478)
Expand Down
8 changes: 4 additions & 4 deletions Documentation/Guides/Installation & Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
[![Version](http://cocoapod-badges.herokuapp.com/v/HockeySDK/badge.png)](http://cocoadocs.org/docsets/HockeySDK)
[![Slack Status](https://slack.hockeyapp.net/badge.svg)](https://slack.hockeyapp.net)

## Version 5.1.0
## Version 5.1.1

- [Changelog](http://www.hockeyapp.net/help/sdk/ios/5.1.0/docs/docs/Changelog.html)
- [Changelog](http://www.hockeyapp.net/help/sdk/ios/5.1.1/docs/docs/Changelog.html)

**NOTE** If your are using the binary integration of our SDK, make sure that the `HockeySDKResources.bundle` inside the `HockeySDK.embeddedframework`-folder has been added to your application.

Expand Down Expand Up @@ -821,7 +821,7 @@ To check if data is send properly to HockeyApp and also see some additional SDK
<a id="documentation"></a>
## 4. Documentation

Our documentation can be found on [HockeyApp](http://hockeyapp.net/help/sdk/ios/5.1.0/index.html).
Our documentation can be found on [HockeyApp](http://hockeyapp.net/help/sdk/ios/5.1.1/index.html).

<a id="troubleshooting"></a>
## 5.Troubleshooting
Expand All @@ -835,7 +835,7 @@ Our documentation can be found on [HockeyApp](http://hockeyapp.net/help/sdk/ios/
Make sure none of the following files are copied into your app bundle, check under app target, `Build Phases`, `Copy Bundle Resources` or in the `.app` bundle after building:

- `HockeySDK.framework` (except if you build a dynamic framework version of the SDK yourself!)
- `de.bitstadium.HockeySDK-iOS-5.1.0.docset`
- `de.bitstadium.HockeySDK-iOS-5.1.1.docset`

### Features are not working as expected

Expand Down
2 changes: 1 addition & 1 deletion Documentation/HockeySDK/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../Themes/apple

module: HockeySDK
module_version: 5.1.0
module_version: 5.1.1
author: Microsoft Corp
author_url: https://www.microsoft.com

Expand Down
4 changes: 2 additions & 2 deletions HockeySDK-Source.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'HockeySDK-Source'
s.version = '5.1.0'
s.version = '5.1.1'

s.summary = 'Collect live crash reports, get feedback from your users, distribute your betas, and analyze your test coverage with HockeyApp.'
s.description = <<-DESC
Expand All @@ -25,7 +25,7 @@ Pod::Spec.new do |s|
s.frameworks = 'CoreGraphics', 'CoreTelephony', 'CoreText', 'MobileCoreServices', 'Photos', 'QuartzCore', 'QuickLook', 'Security', 'SystemConfiguration', 'UIKit'
s.libraries = 'c++', 'z'
s.vendored_frameworks = 'Vendor/CrashReporter.framework'
s.pod_target_xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => %{$(inherited) BITHOCKEY_VERSION="@\\"#{s.version}\\"" BITHOCKEY_C_VERSION="\\"#{s.version}\\"" BITHOCKEY_BUILD="@\\"106\\"" BITHOCKEY_C_BUILD="\\"106\\""} }
s.pod_target_xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => %{$(inherited) BITHOCKEY_VERSION="@\\"#{s.version}\\"" BITHOCKEY_C_VERSION="\\"#{s.version}\\"" BITHOCKEY_BUILD="@\\"107\\"" BITHOCKEY_C_BUILD="\\"107\\""} }
s.resource_bundle = { 'HockeySDKResources' => ['Resources/*.png', 'Resources/*.lproj'] }
s.preserve_paths = 'Resources', 'Support'
s.private_header_files = 'Classes/*Private.h'
Expand Down
2 changes: 1 addition & 1 deletion HockeySDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'HockeySDK'
s.version = '5.1.0'
s.version = '5.1.1'

s.summary = 'Collect live crash reports, get feedback from your users, distribute your betas, and analyze your test coverage with HockeyApp.'
s.description = <<-DESC
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Version](http://cocoapod-badges.herokuapp.com/v/HockeySDK/badge.png)](http://cocoadocs.org/docsets/HockeySDK)
[![Slack Status](https://slack.hockeyapp.net/badge.svg)](https://slack.hockeyapp.net)

## Version 5.1.0
## Version 5.1.1

HockeySDK-iOS implements support for using HockeyApp in your iOS applications.

Expand All @@ -23,13 +23,13 @@ The following features are currently supported:

## 1. Setup

It is super easy to use HockeyApp in your iOS app. Have a look at our [documentation](https://www.hockeyapp.net/help/sdk/ios/5.1.0/index.html) and onboard your app within minutes.
It is super easy to use HockeyApp in your iOS app. Have a look at our [documentation](https://www.hockeyapp.net/help/sdk/ios/5.1.1/index.html) and onboard your app within minutes.

## 2. Documentation

Please visit [our landing page](https://www.hockeyapp.net/help/sdk/ios/5.1.0/index.html) as a starting point for all of our documentation.
Please visit [our landing page](https://www.hockeyapp.net/help/sdk/ios/5.1.1/index.html) as a starting point for all of our documentation.

Please check out our [changelog](http://www.hockeyapp.net/help/sdk/ios/5.1.0/changelog.html), as well as our [troubleshooting section](https://www.hockeyapp.net/help/sdk/ios/5.1.0/installation--setup.html#troubleshooting).
Please check out our [changelog](http://www.hockeyapp.net/help/sdk/ios/5.1.1/changelog.html), as well as our [troubleshooting section](https://www.hockeyapp.net/help/sdk/ios/5.1.1/installation--setup.html#troubleshooting).

## 3. Contributing

Expand All @@ -53,4 +53,4 @@ You must sign a [Contributor License Agreement](https://cla.microsoft.com/) befo

## 4. Contact

If you have further questions or are running into trouble that cannot be resolved by any of the steps [in our troubleshooting section](https://www.hockeyapp.net/help/sdk/ios/5.1.0/installation--setup.html#troubleshooting), feel free to open an issue here, contact us at [support@hockeyapp.net](mailto:support@hockeyapp.net) or join our [Slack](https://slack.hockeyapp.net).
If you have further questions or are running into trouble that cannot be resolved by any of the steps [in our troubleshooting section](https://www.hockeyapp.net/help/sdk/ios/5.1.1/installation--setup.html#troubleshooting), feel free to open an issue here, contact us at [support@hockeyapp.net](mailto:support@hockeyapp.net) or join our [Slack](https://slack.hockeyapp.net).
4 changes: 2 additions & 2 deletions Support/HockeySDKBase.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BUILD_NUMBER = 106
VERSION_STRING = 5.1.0
BUILD_NUMBER = 107
VERSION_STRING = 5.1.1
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(HOCKEYSDK_GCC_PREPROCESSOR_DEFINITIONS) HOCKEYSDK_CONFIGURATION_$(CONFIGURATION) BITHOCKEY_VERSION="@\""$(VERSION_STRING)"\"" BITHOCKEY_BUILD="@\""$(BUILD_NUMBER)"\"" BITHOCKEY_C_VERSION="\""$(VERSION_STRING)"\"" BITHOCKEY_C_BUILD="\""$(BUILD_NUMBER)"\""
BIT_ARM_ARCHS = armv7 armv7s arm64
BIT_SIM_ARCHS = x86_64 i386
Expand Down