Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Commit dd2c763

Browse files
author
Benjamin Scholtysik (Reimold)
authored
Merge pull request #92 from bitstadium/fix/bump-version-in-template
Fix/bump version in template
2 parents 569bc8c + cf9be4a commit dd2c763

File tree

1 file changed

+124
-112
lines changed

1 file changed

+124
-112
lines changed

docs/Guide-Installation-Setup-template.md

Lines changed: 124 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
1-
## Version 4.1.1
1+
## Version 4.1.2
22

3-
- [Changelog](http://www.hockeyapp.net/help/sdk/mac/4.1.1/docs/docs/Changelog.html)
3+
- [Changelog](http://www.hockeyapp.net/help/sdk/mac/4.1.2/docs/docs/Changelog.html)
44

55
**NOTE:** With the release of HockeySDK 4.0.0-alpha.1 a bug was introduced which lead to the exclusion of the Application Support folder from iCloud and iTunes backups.
66

7-
If you have been using one of the affected versions (4.0.0-alpha.2, Version 4.0.0-beta.1, 4.0.0, 4.1.0-alpha.1, 4.1.0-alpha.2, or Version 4.1.0-beta.1), please make sure to update to at least version 4.0.1 or 4.1.0-beta.2 of our SDK as soon as you can.
8-
7+
If you have been using one of the affected versions (4.0.0-alpha.2, Version 4.0.0-beta.1, 4.0.0, 4.1.0-alpha.1, 4.1.0-alpha.2, or Version 4.1.0-beta.1), please make sure to update to a newer version of our SDK as soon as you can.
98

109
## Introduction
1110

11+
HockeySDK-Mac implements support for using HockeyApp in your Mac applications.
12+
13+
The following feature is currently supported:
14+
15+
1. **Collect crash reports:** If you app crashes, a crash log with the same format as from the Apple Crash Reporter is written to the device's storage. If the user starts the app again, he is asked to submit the crash report to HockeyApp. This works for both beta and live apps, i.e. those submitted to the App Store!
16+
17+
2. **User Metrics:** Understand user behavior to improve your app. Track usage through daily and monthly active users, monitor crash impacted users, as well as customer engagement through session count. You can now track Custom Events in your app, understand user actions and see the aggregates on the HockeyApp portal.
18+
19+
3. **Feedback:** Collect feedback from your users from within your app and communicate directly with them using the HockeyApp backend.
20+
21+
4. **Add analytics to Sparkle:** If you are using Sparkle to provide app-updates (HockeyApp also supports Sparkle feeds for beta distribution) the SDK contains helpers to add some analytics data to each Sparkle request.
22+
1223
This document contains the following sections:
1324

1425
1. [Requirements](#requirements)
1526
2. [Setup](#setup)
1627
3. [Advanced Setup](#advancedsetup)
17-
1. [Setup with CocoaPods](#cocoapods)
18-
2. [Crash Reporting](#crashreporting)
19-
3. [User Metrics](#user-metrics)
20-
4. [Feedback](#feedback)
21-
5. [Sparkle](#sparkle)
22-
6. [Debug information](#debug)
28+
1. [Setup with CocoaPods](#cocoapods)
29+
2. [Crash Reporting](#crashreporting)
30+
3. [User Metrics](#user-metrics)
31+
4. [Feedback](#feedback)
32+
5. [Sparkle](#sparkle)
33+
6. [Debug information](#debug)
2334
4. [Documentation](#documentation)
2435
5. [Troubleshooting](#troubleshooting)
2536
6. [Contributing](#contributing)
26-
7. [Contributor License](#contributorlicense)
27-
8. [Contact](#contact)
37+
1. [Code of Coduct](#codeofconduct)
38+
2. [Contributor License](#contributorlicense)
39+
7. [Contact](#contact)
2840

2941
<a id="requirements"></a>
3042
## 1. Requirements
@@ -58,14 +70,14 @@ From our experience, 3rd-party libraries usually reside inside a subdirectory (l
5870
3. Drag & drop `HockeySDK.framework` from your window in the `Finder` into your project in Xcode and move it to the desired location in the `Project Navigator` (e.g. into the group called `Vendor`)
5971
4. A popup will appear. Select `Create groups for any added folders` and set the checkmark for your target. Then click `Finish`.
6072
5. Now we’ll make sure the framework is copied into your app bundle:
61-
- Click on your project in the `Project Navigator` (⌘+1).
62-
- Click your target in the project editor.
63-
- Click on the `Build Phases` tab.
64-
- Click the `Add Build Phase` button at the bottom and choose `Add Copy Files`.
65-
- Click the disclosure triangle next to the new build phase.
66-
- Choose `Frameworks` from the Destination list.
67-
- Drag `HockeySDK-Mac` from the Project Navigator left sidebar to the list in the new Copy Files phase.
68-
73+
- Click on your project in the `Project Navigator` (⌘+1).
74+
- Click your target in the project editor.
75+
- Click on the `Build Phases` tab.
76+
- Click the `Add Build Phase` button at the bottom and choose `Add Copy Files`.
77+
- Click the disclosure triangle next to the new build phase.
78+
- Choose `Frameworks` from the Destination list.
79+
- Drag `HockeySDK-Mac` from the Project Navigator left sidebar to the list in the new Copy Files phase.
80+
6981
6. Make sure to sign the app, since the SDK will store user related input in the keychain for privacy reasons
7082

7183
<a id="modifycode"></a>
@@ -76,36 +88,36 @@ From our experience, 3rd-party libraries usually reside inside a subdirectory (l
7688
1. Open your `AppDelegate.m` file.
7789
2. Add the following line at the top of the file below your own `import` statements:
7890

79-
```objectivec
80-
@import HockeySDK;
81-
```
91+
```objectivec
92+
@import HockeySDK;
93+
```
8294

8395
3. Search for the method `applicationDidFinishLaunching:`
8496
4. Add the following lines to setup and start the Application Insights SDK:
8597

86-
```objectivec
87-
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"APP_IDENTIFIER"];
88-
// Do some additional configuration if needed here
89-
[[BITHockeyManager sharedHockeyManager] startManager];
90-
```
98+
```objectivec
99+
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"APP_IDENTIFIER"];
100+
// Do some additional configuration if needed here
101+
[[BITHockeyManager sharedHockeyManager] startManager];
102+
```
91103
92104
**Swift**
93105
94106
1. Open your `AppDelegate.swift` file.
95107
2. Add the following line at the top of the file below your own import statements:
96-
97-
```swift
98-
import HockeySDK
99-
```
108+
109+
```swift
110+
import HockeySDK
111+
```
100112

101113
3. Search for the method `applicationWillFinishLaunching`
102114
4. Add the following lines to setup and start the Application Insights SDK:
103-
104-
```swift
105-
BITHockeyManager.sharedHockeyManager().configureWithIdentifier("APP_IDENTIFIER")
106-
// Do some additional configuration if needed here
107-
BITHockeyManager.sharedHockeyManager().startManager()
108-
```
115+
116+
```swift
117+
BITHockeyManager.sharedHockeyManager().configureWithIdentifier("APP_IDENTIFIER")
118+
// Do some additional configuration if needed here
119+
BITHockeyManager.sharedHockeyManager().startManager()
120+
```
109121

110122
*Note:* In case of document based apps, invoke `startManager` at the end of `applicationDidFinishLaunching`, since otherwise you may lose the Apple events to restore, open untitled document etc.
111123

@@ -172,39 +184,39 @@ On Mac OS X there are three types of crashes that are not reported to a register
172184
1. Custom `NSUncaughtExceptionHandler` don't start working until after `NSApplication` has finished calling all of its delegate methods!
173185
Example:
174186

175-
```objectivec
176-
- (void)applicationDidFinishLaunching:(NSNotification *)note {
177-
...
178-
[NSException raise:@"ExceptionAtStartup" format:@"This will not be recognized!"];
179-
...
180-
}
181-
```
187+
```objectivec
188+
- (void)applicationDidFinishLaunching:(NSNotification *)note {
189+
...
190+
[NSException raise:@"ExceptionAtStartup" format:@"This will not be recognized!"];
191+
...
192+
}
193+
```
182194

183195
2. The default `NSUncaughtExceptionHandler` in `NSApplication` only logs exceptions to the console and ends their processing. Resulting in exceptions that occur in the `NSApplication` "scope" not occurring in a registered custom `NSUncaughtExceptionHandler`.
184196
Example:
185197

186-
```objectivec
187-
- (void)applicationDidFinishLaunching:(NSNotification *)note {
188-
...
189-
[self performSelector:@selector(delayedException) withObject:nil afterDelay:5];
190-
...
191-
}
192-
193-
- (void)delayedException {
194-
NSArray *array = [NSArray array];
195-
[array objectAtIndex:23];
196-
}
197-
```
198+
```objectivec
199+
- (void)applicationDidFinishLaunching:(NSNotification *)note {
200+
...
201+
[self performSelector:@selector(delayedException) withObject:nil afterDelay:5];
202+
...
203+
}
204+
205+
- (void)delayedException {
206+
NSArray *array = [NSArray array];
207+
[array objectAtIndex:23];
208+
}
209+
```
198210

199211
3. Any exceptions occurring in IBAction or other GUI does not even reach the NSApplication default UncaughtExceptionHandler.
200212
Example:
201213

202-
```objective
203-
- (IBAction)doExceptionCrash:(id)sender {
204-
NSArray *array = [NSArray array];
205-
[array objectAtIndex:23];
206-
}
207-
```
214+
```objective
215+
- (IBAction)doExceptionCrash:(id)sender {
216+
NSArray *array = [NSArray array];
217+
[array objectAtIndex:23];
218+
}
219+
```
208220

209221
In general there are two solutions. The first one is to use an `NSExceptionHandler` class instead of an `NSUncaughtExceptionHandler`. But this has a few drawbacks which are detailed in `BITCrashReportExceptionApplication.h`.
210222

@@ -230,28 +242,28 @@ The `BITCrashManagerDelegate` protocol (which is automatically included in `BITH
230242

231243
1. Text attachments: `-(NSString *)applicationLogForCrashManager:(BITCrashManager *)crashManager`
232244

233-
Check the following tutorial for an example on how to add CocoaLumberjack log data: [How to Add Application Specific Log Data on iOS or OS X](http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/how-to-add-application-specific-log-data-on-ios-or-os-x)
245+
Check the following tutorial for an example on how to add CocoaLumberjack log data: [How to Add Application Specific Log Data on iOS or OS X](http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/how-to-add-application-specific-log-data-on-ios-or-os-x)
234246

235247
2. Binary attachments: `-(BITHockeyAttachment *)attachmentForCrashManager:(BITCrashManager *)crashManager`
236248

237249
Make sure to implement the protocol
238250

239-
```objectivec
240-
@interface YourAppDelegate () <BITHockeyManagerDelegate> {}
241-
242-
@end
243-
```
251+
```objectivec
252+
@interface YourAppDelegate () <BITHockeyManagerDelegate> {}
253+
254+
@end
255+
```
244256

245257
and set the delegate:
246258

247-
```objectivec
248-
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"APP_IDENTIFIER"];
249-
250-
[[BITHockeyManager sharedHockeyManager] setDelegate: self];
251-
252-
[[BITHockeyManager sharedHockeyManager] startManager];
253-
```
254-
259+
```objectivec
260+
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"APP_IDENTIFIER"];
261+
262+
[[BITHockeyManager sharedHockeyManager] setDelegate: self];
263+
264+
[[BITHockeyManager sharedHockeyManager] startManager];
265+
```
266+
255267
<a name="user-metrics"></a>
256268
### 3.3 User Metrics
257269
@@ -309,11 +321,11 @@ It's possible to attach porperties and/or measurements to a custom event.
309321
BITMetricsManager *metricsManager = [BITHockeyManager sharedHockeyManager].metricsManager;
310322

311323
NSDictionary *myProperties = @{@"Property 1" : @"Something",
312-
@"Property 2" : @"Other thing",
313-
@"Property 3" : @"Totally different thing"};
324+
@"Property 2" : @"Other thing",
325+
@"Property 3" : @"Totally different thing"};
314326
NSDictionary *myMeasurements = @{@"Measurement 1" : @1,
315-
@"Measurement 2" : @2.34,
316-
@"Measurement 3" : @2000000};
327+
@"Measurement 2" : @2.34,
328+
@"Measurement 3" : @2000000};
317329

318330
[metricsManager trackEventWithName:eventName properties:myProperties measurements:myMeasurements]
319331
```
@@ -323,7 +335,7 @@ NSDictionary *myMeasurements = @{@"Measurement 1" : @1,
323335
```swift
324336
let myProperties = ["Property 1": "Something", "Property 2": "Other thing", "Property 3" : "Totally different thing."]
325337
let myMeasurements = ["Measurement 1": 1, "Measurement 2": 2.3, "Measurement 3" : 30000]
326-
338+
327339
let metricsManager = BITHockeyManager.sharedHockeyManager().metricsManager
328340
metricsManager.trackEventWithName(eventName, properties: myProperties, myMeasurements: measurements)
329341
```
@@ -332,9 +344,9 @@ metricsManager.trackEventWithName(eventName, properties: myProperties, myMeasure
332344
### 3.4 Feedback
333345

334346
`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.
335-
347+
336348
You should never create your own instance of `BITFeedbackManager` but use the one provided by the `[BITHockeyManager sharedHockeyManager]`:
337-
349+
338350
```objectivec
339351
[BITHockeyManager sharedHockeyManager].feedbackManager
340352
```
@@ -348,8 +360,8 @@ Please check the [documentation](#documentation) of the `BITFeedbackManager` cla
348360
#### 3.5.1 Setup for beta distribution
349361

350362
1. Install the Sparkle SDK: [http://sparkle-project.org](http://sparkle-project.org)
351-
As of today (01/2016), Sparkle doesn't support Mac sandboxes. If you require this, check out the following discussion https://github.com/sparkle-project/Sparkle/issues/363
352-
363+
As of today (01/2016), Sparkle doesn't support Mac sandboxes. If you require this, check out the following discussion https://github.com/sparkle-project/Sparkle/issues/363
364+
353365
2. Set `SUFeedURL` to `https://rink.hockeyapp.net/api/2/apps/<APP_IDENTIFIER>` and replace `<APP_IDENTIFIER>` with the same value used to initialize the HockeySDK
354366

355367
3. Create a `.zip` file of your app bundle and upload that to HockeyApp.
@@ -359,34 +371,34 @@ Please check the [documentation](#documentation) of the `BITFeedbackManager` cla
359371

360372
1. Set the following additional Sparkle property:
361373

362-
```objectivec
363-
sparkleUpdater.sendsSystemProfile = YES;
364-
```
374+
```objectivec
375+
sparkleUpdater.sendsSystemProfile = YES;
376+
```
365377

366378
2. Add the following Sparkle delegate method (don't forget to bind `SUUpdater` to your appDelegate!):
367379

368-
```objectivec
369-
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater
370-
sendingSystemProfile:(BOOL)sendingProfile {
371-
return [[BITSystemProfile sharedSystemProfile] systemUsageData];
372-
}
373-
```
380+
```objectivec
381+
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater
382+
sendingSystemProfile:(BOOL)sendingProfile {
383+
return [[BITSystemProfile sharedSystemProfile] systemUsageData];
384+
}
385+
```
374386

375387
3. Initialize usage tracking depending on your needs.
376388

377-
One example scenario is when the app is started or comes to foreground and when it goes to background or is terminated:
389+
One example scenario is when the app is started or comes to foreground and when it goes to background or is terminated:
378390

379-
```objectivec
380-
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
381-
382-
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
383-
BITSystemProfile *bsp = [BITSystemProfile sharedSystemProfile];
384-
[dnc addObserver:bsp selector:@selector(startUsage) name:NSApplicationDidBecomeActiveNotification object:nil];
385-
[dnc addObserver:bsp selector:@selector(stopUsage) name:NSApplicationWillTerminateNotification object:nil];
386-
[dnc addObserver:bsp selector:@selector(stopUsage) name:NSApplicationWillResignActiveNotification object:nil];
387-
388-
};
389-
```
391+
```objectivec
392+
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
393+
394+
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
395+
BITSystemProfile *bsp = [BITSystemProfile sharedSystemProfile];
396+
[dnc addObserver:bsp selector:@selector(startUsage) name:NSApplicationDidBecomeActiveNotification object:nil];
397+
[dnc addObserver:bsp selector:@selector(stopUsage) name:NSApplicationWillTerminateNotification object:nil];
398+
[dnc addObserver:bsp selector:@selector(stopUsage) name:NSApplicationWillResignActiveNotification object:nil];
399+
400+
};
401+
```
390402
391403
<a id="debug"></a>
392404
### 3.6 Debug information
@@ -404,24 +416,24 @@ To check if data is send properly to HockeyApp and also see some additional SDK
404416
<a id="documentation"></a>
405417
## 4. Documentation
406418

407-
Our documentation can be found on [HockeyApp](http://hockeyapp.net/help/sdk/mac/4.1.1/index.html).
419+
Our documentation can be found on [HockeyApp](http://hockeyapp.net/help/sdk/mac/4.1.2/index.html).
408420

409421
<a id="troubleshooting"></a>
410422
## 5.Troubleshooting
411423

412424
1. dlyb crash on startup
413425

414-
Make sure that the apps build setting has `LD_RUNPATH_SEARCH_PATHS` set to `@executable_path/../Frameworks`
426+
Make sure that the apps build setting has `LD_RUNPATH_SEARCH_PATHS` set to `@executable_path/../Frameworks`
415427

416428
2. Crash on startup with Xcode debugger running
417429

418-
Make sure there is no `All Exceptions` breakpoint active or limit it to `Objective-C` only and exclude `C++`.
430+
Make sure there is no `All Exceptions` breakpoint active or limit it to `Objective-C` only and exclude `C++`.
419431

420432
3. Feature are not working as expected
421433

422-
Enable debug output to the console to see additional information from the SDK initializing the modules, sending and receiving network requests and more by adding the following code before calling `startManager`:
434+
Enable debug output to the console to see additional information from the SDK initializing the modules, sending and receiving network requests and more by adding the following code before calling `startManager`:
423435

424-
[BITHockeyManager sharedHockeyManager].logLevel = BITLogLevelDebug;
436+
[BITHockeyManager sharedHockeyManager].logLevel = BITLogLevelDebug;
425437

426438
<a id="contributing"></a>
427439
## 6. Contributing

0 commit comments

Comments
 (0)