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

Commit

Permalink
Merge pull request #444 from bitstadium/release/500-beta-1
Browse files Browse the repository at this point in the history
Release/500 beta 1
  • Loading branch information
Benjamin Scholtysik (Reimold) authored Aug 3, 2017
2 parents cdde5d1 + e711965 commit 4fe23f0
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 96 deletions.
4 changes: 4 additions & 0 deletions Classes/BITAttributedLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@
static const NSTextAlignment BITTextAlignmentNatural = NSTextAlignmentNatural;

static const NSLineBreakMode BITLineBreakByWordWrapping = NSLineBreakByWordWrapping;

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-const-variable"
static const NSLineBreakMode BITLineBreakByCharWrapping = NSLineBreakByCharWrapping;
static const NSLineBreakMode BITLineBreakByClipping = NSLineBreakByClipping;
#pragma clang diagnostic pop
static const NSLineBreakMode BITLineBreakByTruncatingHead = NSLineBreakByTruncatingHead;
static const NSLineBreakMode BITLineBreakByTruncatingMiddle = NSLineBreakByTruncatingMiddle;
static const NSLineBreakMode BITLineBreakByTruncatingTail = NSLineBreakByTruncatingTail;
Expand Down
33 changes: 1 addition & 32 deletions Classes/BITFeedbackManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#if HOCKEYSDK_FEATURE_FEEDBACK

#import <AssetsLibrary/AssetsLibrary.h>
#import <Photos/Photos.h>

#import "HockeySDKPrivate.h"
Expand Down Expand Up @@ -1262,37 +1261,7 @@ - (void)requestLatestImageWithCompletionHandler:(BITLatestImageFetchCompletionBl
// Safeguard in case the dev hasn't set the NSPhotoLibraryUsageDescription in their Info.plist
if (![self isiOS10PhotoPolicySet]) {return;}

// Only available from iOS 8 up
id phImageManagerClass = NSClassFromString(@"PHImageManager");
if (phImageManagerClass) {
[self fetchLatestImageUsingPhotoLibraryWithCompletionHandler:completionHandler];
} else {
[self fetchLatestImageUsingAssetsLibraryWithCompletionHandler:completionHandler];
}
}

- (void)fetchLatestImageUsingAssetsLibraryWithCompletionHandler:(BITLatestImageFetchCompletionBlock)completionHandler {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) {

[group setAssetsFilter:[ALAssetsFilter allPhotos]];

[group enumerateAssetsWithOptions:NSEnumerationReverse usingBlock:^(ALAsset *alAsset, NSUInteger __unused index, BOOL *innerStop) {

if (alAsset) {
ALAssetRepresentation *representation = [alAsset defaultRepresentation];
UIImage *latestPhoto = [UIImage imageWithCGImage:[representation fullScreenImage]];

completionHandler(latestPhoto);

*stop = YES;
*innerStop = YES;
}
}];
} failureBlock:nil];
#pragma clang diagnostic pop
[self fetchLatestImageUsingPhotoLibraryWithCompletionHandler:completionHandler];
}

- (void)fetchLatestImageUsingPhotoLibraryWithCompletionHandler:(BITLatestImageFetchCompletionBlock)completionHandler NS_AVAILABLE_IOS(8_0) {
Expand Down
8 changes: 8 additions & 0 deletions Documentation/Guides/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 5.0.0-beta.1

This version drops support for iOS 7. There is not other breaking change at this point.

- [IMPROVEMENT] The code has been cleaned up as we have decided to drop support for iOS 7.
- [IMPROVEMENT] `properties` of type `NSString` now use the `copy` attribute.
- [BUGFIX] The logic that makes sure that the for HockeySDK-iOS is excluded from backups was changed to make sure it doesn't block app launch [#443](https://github.com/bitstadium/HockeySDK-iOS/pull/443).

## 4.1.6

- [BUGFIX] Fixed a string in the Italian translation [#430](https://github.com/bitstadium/HockeySDK-iOS/pull/430).
Expand Down
46 changes: 22 additions & 24 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 4.1.6
## Version 5.0.0-beta.1

- [Changelog](http://www.hockeyapp.net/help/sdk/ios/4.1.6/docs/docs/Changelog.html)
- [Changelog](http://www.hockeyapp.net/help/sdk/ios/5.0.0-beta.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 @@ -84,7 +84,7 @@ Please see the "[How to create a new app](http://support.hockeyapp.net/kb/about-

From our experience, 3rd-party libraries usually reside inside a subdirectory (let's call our subdirectory `Vendor`), so if you don't have your project organized with a subdirectory for libraries, now would be a great start for it. To continue our example, create a folder called `Vendor` inside your project directory and move the unzipped `HockeySDK-iOS`-folder into it.

The SDK comes in four flavours:
The SDK comes in four flavors:

* Default SDK without Feedback: `HockeySDK.embeddedframework`
* Full featured SDK with Feedback: `HockeySDK.embeddedframework` in the subfolder `HockeySDKAllFeatures`.
Expand All @@ -97,7 +97,7 @@ Our examples will use the **default** SDK (`HockeySDK.embeddedframework`).

### 2.4 Add the SDK to the project in Xcode

> We recommend to use Xcode's group-feature to create a group for 3rd-party-libraries similar to the structure of our files on disk. For example, similar to the file structure in 2.3 above, our projects have a group called `Vendor`.
> We recommend using Xcode's group-feature to create a group for 3rd-party-libraries similar to the structure of our files on disk. For example, similar to the file structure in 2.3 above, our projects have a group called `Vendor`.

1. Make sure the `Project Navigator` is visible (⌘+1).
2. Drag & drop `HockeySDK.embeddedframework` from your `Finder` to the `Vendor` group in `Xcode` using the `Project Navigator` on the left side.
Expand Down Expand Up @@ -173,7 +173,7 @@ Our examples will use the **default** SDK (`HockeySDK.embeddedframework`).
```


*Note:* The SDK is optimized to defer everything possible to a later time while making sure e.g. crashes on startup can also be caught and each module executes other code with a delay some seconds. This ensures that `applicationDidFinishLaunching` will process as fast as possible and the SDK will not block the startup sequence resulting in a possible kill by the watchdog process.
*Note:* The SDK is optimized to defer everything possible to a later time while making sure e.g. crashes on start-up can also be caught and each module executes other code with a delay some seconds. This ensures that `applicationDidFinishLaunching` will process as fast as possible and the SDK will not block the start-up sequence resulting in a possible kill by the watchdog process.


**Congratulation, now you're all set to use HockeySDK!**
Expand All @@ -192,7 +192,6 @@ If you are working with an older project which doesn't support clang modules yet
4. Expand `Link Binary With Libraries`.
5. Add the following system frameworks, if they are missing:
1. Default SDK:
+ `AssetsLibrary`
+ `CoreText`
+ `CoreGraphics`
+ `Foundation`
Expand All @@ -205,7 +204,6 @@ If you are working with an older project which doesn't support clang modules yet
+ `libc++`
+ `libz`
2. SDK with all features:
+ `AssetsLibrary`
+ `CoreText`
+ `CoreGraphics`
+ `Foundation`
Expand All @@ -230,7 +228,7 @@ If you are working with an older project which doesn't support clang modules yet
+ `SystemConfiguration`
+ `libc++`

Note that this also means that you can't use the `@import` syntax mentioned in the [Modify Code](#modify) section but have to stick to the old `#import <HockeySDK/HockeySDK.h>`.
Note that not using clang modules also means that you can't use the `@import` syntax mentioned in the [Modify Code](#modify) section but have to stick to the old `#import <HockeySDK/HockeySDK.h>` imports.

<a id="cocoapods"></a>
### 3.2 CocoaPods
Expand Down Expand Up @@ -276,7 +274,7 @@ pod "HockeySDK", :subspecs => ['CrashOnlyExtensionsLib']

#### 3.2.2 Source Integration Options

Alternatively you can integrate the SDK by source if you want to do modifications or want a different feature set. The following entry will integrate the SDK:
Alternatively, you can integrate the SDK by source if you want to do modifications or want a different feature set. The following entry will integrate the SDK:

```ruby
pod "HockeySDK-Source"
Expand Down Expand Up @@ -404,7 +402,7 @@ The following points need to be considered to use HockeySDK with WatchKit 1 Exte
<a name="crashreporting"></a>
### 3.6 Crash Reporting

The following options only show some of possibilities to interact and fine-tune the crash reporting feature. For more please check the full documentation of the `BITCrashManager` class in our [documentation](#documentation).
The following options only show some of the possibilities to interact and fine-tune the crash reporting feature. For more please check the full documentation of the `BITCrashManager` class in our [documentation](#documentation).

#### 3.6.1 Disable Crash Reporting
The HockeySDK enables crash reporting **per default**. Crashes will be immediately sent to the server the next time the app is launched.
Expand Down Expand Up @@ -435,15 +433,15 @@ Crashes are send the next time the app starts. If `crashManagerStatus` is set to

The SDK is not sending the reports right when the crash happens deliberately, because if is not safe to implement such a mechanism while being async-safe (any Objective-C code is _NOT_ async-safe!) and not causing more danger like a deadlock of the device, than helping. We found that users do start the app again because most don't know what happened, and you will get by far most of the reports.

Sending the reports on startup is done asynchronously (non-blocking). This is the only safe way to ensure that the app won't be possibly killed by the iOS watchdog process, because startup could take too long and the app could not react to any user input when network conditions are bad or connectivity might be very slow.
Sending the reports on start-up is done asynchronously (non-blocking). This is the only safe way to ensure that the app won't be possibly killed by the iOS watchdog process, because start-up could take too long and the app could not react to any user input when network conditions are bad or connectivity might be very slow.

#### 3.6.3 Mach Exception Handling

By default the SDK is using the safe and proven in-process BSD Signals for catching crashes. This option provides an option to enable catching fatal signals via a Mach exception server instead.

We strongly advice _NOT_ to enable Mach exception handler in release versions of your apps!
We strongly advise _NOT_ to enable Mach exception handler in release versions of your apps!

*Warning:* The Mach exception handler executes in-process, and will interfere with debuggers when they attempt to suspend all active threads (which will include the Mach exception handler). Mach-based handling should _NOT_ be used when a debugger is attached. The SDK will not enabled catching exceptions if the app is started with the debugger running. If you attach the debugger during runtime, this may cause issues the Mach exception handler is enabled!
*Warning:* The Mach exception handler executes in-process, and will interfere with debuggers when they attempt to suspend all active threads (which will include the Mach exception handler). Mach-based handling should _NOT_ be used when a debugger is attached. The SDK will not enable catching exceptions if the app is started with the debugger running. If you attach the debugger during runtime, this may cause issues the Mach exception handler is enabled!

```objc
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"APP_IDENTIFIER"];
Expand Down Expand Up @@ -533,7 +531,7 @@ metricsManager.trackEventWithName(eventName)

#### 3.7.2 Attaching custom properties and measurements to a custom event

It's possible to attach properties and/or measurements to a custom event. There is one limitation to attaching properties and measurements. They currently don't show up in the HockeyApp dashboard but you have to link your app to Application Insights to be able to query them. Please have a look at [our blogpost](https://www.hockeyapp.net/blog/2016/08/30/custom-events-public-preview.html) to find out how to do that.
It's possible to attach properties and/or measurements to a custom event. There is one limitation to attaching properties and measurements. They currently don't show up in the HockeyApp dashboard but you have to link your app to Application Insights to be able to query them. Please have a look at [our blog post](https://www.hockeyapp.net/blog/2016/08/30/custom-events-public-preview.html) to find out how to do that.

- Properties have to be a string.
- Measurements have to be of a numeric type.
Expand Down Expand Up @@ -570,15 +568,15 @@ As of HockeySDK 4.1.1, Feedback is no longer part of the default SDK. To use fee

#### 3.8.1 Integrate the full-featured SDK.

If you're integrating the binary yourself, use the `HockeySDK.embeddedframework` in the subfolder `HockeySDKAllFeatures`. If you're using Cocoapods, use
If you're integrating the binary yourself, use the `HockeySDK.embeddedframework` in the subfolder `HockeySDKAllFeatures`. If you're using CocoaPods, use

```ruby
pod "HockeySDK", :subspecs => ['AllFeaturesLib']
```

in your podfile.

`BITFeedbackManager` lets your users communicate directly with you via the app and an integrated user interface. It provides a single threaded discussion with a user running your app. This feature is only enabled, if you integrate the actual view controllers into your app.
`BITFeedbackManager` lets your users communicate directly with you via the app and an integrated user interface. It provides a single threaded discussion with a user running your app. This feature is only enabled if you integrate the actual view controllers into your app.

You should never create your own instance of `BITFeedbackManager` but use the one provided by the `[BITHockeyManager sharedHockeyManager]`:

Expand All @@ -600,7 +598,7 @@ If the value is missing from your `Info.plist`, the SDK will disable attaching p

This is the HockeySDK module for handling app updates when having your app released in the App Store.

When an update is detected, this module will show an alert asking the user if he/she wants to update or ignore this version. If update was chosen, it will open the apps page in the app store app.
When an update is detected, this module will show an alert asking the user if he/she wants to update or ignore this version. If the update was chosen, it will open the apps page in the app store app.

By default this module is **NOT** enabled! To enable it use the following code:

Expand All @@ -619,9 +617,9 @@ Please check the [documentation](#documentation) of the `BITStoreUpdateManager`
<a name="betaupdates"></a>
### 3.10 In-App-Updates (Beta & Enterprise only)

The following options only show some of possibilities to interact and fine-tune the update feature when using Ad-Hoc or Enterprise provisioning profiles. For more please check the full documentation of the `BITUpdateManager` class in our [documentation](#documentation).
The following options only show some of the possibilities to interact and fine-tune the update feature when using Ad-Hoc or Enterprise provisioning profiles. For more please check the full documentation of the `BITUpdateManager` class in our [documentation](#documentation).

The feature handles version updates, presents update and version information in a App Store like user interface, collects usage information and provides additional authorization options when using Ad-Hoc provisioning profiles.
The feature handles version updates, presents the update and version information in a App Store like user interface, collects usage information and provides additional authorization options when using Ad-Hoc provisioning profiles.

This module automatically disables itself when running in an App Store build by default!

Expand Down Expand Up @@ -655,7 +653,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/4.1.6/index.html).
Our documentation can be found on [HockeyApp](http://hockeyapp.net/help/sdk/ios/5.0.0-beta.1/index.html).

<a id="troubleshooting"></a>
## 5.Troubleshooting
Expand All @@ -669,7 +667,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-4.1.6.docset`
- `de.bitstadium.HockeySDK-iOS-5.0.0-beta.1.docset`

### Features are not working as expected

Expand Down Expand Up @@ -697,9 +695,9 @@ We're looking forward to your contributions via pull requests on our [GitHub rep

* A Mac running the latest version of OS X
* Get the latest Xcode from the Mac App Store
* [AppleDoc](https://github.com/tomaz/appledoc)
* [CocoaPods](https://cocoapods.org/)
* [Carthage](https://github.com/Carthage/Carthage)
* [Jazzy](https://github.com/realm/jazzy) to generate documentation
* [CocoaPods](https://cocoapods.org/) to test integration with CocoaPods.
* [Carthage](https://github.com/Carthage/Carthage) to test integration with Carthage.

<a id="codeofconduct"></a>
### 6.2 Code of Conduct
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: 4.1.6
module_version: 5.0.0-beta.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 = '4.1.6'
s.version = '5.0.0-beta.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 = 'AssetsLibrary', '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="@\\"101\\"" BITHOCKEY_C_BUILD="\\"101\\""} }
s.pod_target_xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => %{$(inherited) BITHOCKEY_VERSION="@\\"#{s.version}\\"" BITHOCKEY_C_VERSION="\\"#{s.version}\\"" BITHOCKEY_BUILD="@\\"102\\"" BITHOCKEY_C_BUILD="\\"102\\""} }
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 = '4.1.6'
s.version = '5.0.0-beta.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
Loading

0 comments on commit 4fe23f0

Please sign in to comment.