73 Commits

Author SHA1 Message Date
Andreas Linde
5cd861dbb0 Fix formatting of appname in crash reports
Fixes highlights on HockeyApp backend of apps with special chars in their name
2014-09-08 14:25:02 +02:00
Andreas Linde
aa7b2e018f Change attachmentData property of BITCrashAttachment to crashAttachmentData 2014-09-08 14:06:04 +02:00
Andreas Linde
1068bb119c Add support for binary attachments to crash reports 2014-02-27 18:21:17 +01:00
Andreas Linde
1df317b59f If BITAuthenticator is set to BITAuthenticatorIdentificationTypeWebAuth then also attach the user email to crash reports 2014-02-20 14:02:02 +01:00
Andreas Linde
53ae4c2dff Disable on device symbolication by default and add a property to enable it 2014-02-11 16:37:06 +01:00
Andreas Linde
6d6aa54bea Add new setter for global userID, userName, and userEmail properties
The values are used by the `BITCrashManager` to attach to a crash report and`BITFeedbackManager for assigning the user to a discussion thread.

The value can be set at any time and will be stored in the keychain on the current device only! To delete the value from the keychain set the value to `nil`.

These properties are optional and alternatives to the delegates. If you want to define specific values for each component, use the delegate instead which do overwrite the values set by these properties.

Also fixed a typo in the delegates documentation.
2014-02-11 16:22:31 +01:00
Andreas Linde
88bf3fae62 Move creation of settings directory into helper function 2014-02-11 15:40:11 +01:00
Andreas Linde
670e376e9e Change the default of crashmanagers showAlways property to YES
This results in crash report alerts by default showing the `Always` button, so they will never be asked again and future crash reports will be send automatically.
2014-01-12 21:08:53 +01:00
Andreas Linde
235f7ac9fe Updated copyright for 2014 2014-01-12 19:25:22 +01:00
Andreas Linde
0712b8fa63 Use the correct User-Agent name when sending crash reports 2014-01-12 19:15:28 +01:00
Andreas Linde
47d90a7df3 Merge branch 'refs/heads/develop' into feature/improvements 2013-12-27 17:45:19 +01:00
Andreas Linde
cdfca4d330 Add the option to define callbacks that will be executed prior to program termination after a crash has occurred
This is _NOT_recommended to be used!

Code that runs in such callbacks need to be async-safe, which excludes ANY Objective-C code and lots of C as well. See https://www.plcrashreporter.org/documentation/api/v1.2-rc2/async_safety.html
2013-12-19 15:36:31 +01:00
Andreas Linde
720dbccefe Add generateTestCrash method 2013-12-18 20:47:04 +01:00
Andreas Linde
8cf4665570 Add generateTestCrash method 2013-11-21 00:03:14 +01:00
Andreas Linde
323b9784ea Simplified configuration
- Add simplified initializers
- Add option to set delegate via public property
2013-11-20 22:54:28 +01:00
Andreas Linde
56ca20098b Add additional tests for BITCrashManager 2013-09-25 14:36:53 +02:00
Andreas Linde
a23930a54e Add first set of basic unit tests for BITCrashManager
Also make minor changes to BITCrashManager to be able to test
2013-09-25 01:47:32 +02:00
Andreas Linde
71fcedfd82 This doesn't belong in here *sigh* 2013-09-24 21:35:19 +02:00
Andreas Linde
527de1d210 Add identification from BITAuthenticator to crash reports 2013-09-24 21:30:50 +02:00
Thomas Dohmke
14d4ccaddf Fix for userName, userEmail, and userID in crash reports. 2013-09-20 11:55:59 +02:00
Andreas Linde
3273fdd06a Add support for background fetch in BITCrashManager
Automatic sending crash reports or alert asking the user for permission to send crash reports will only appear if the app is running in the foreground
2013-09-16 13:19:13 +02:00
Andreas Linde
67d56af15d Fix warnings when building with iOS 7 as deployment target 2013-09-12 11:26:19 +02:00
Andreas Linde
11a8a14e4f Add support for excluding features at compile time
Features can be excluded/included at compile-time using #define statements, e.g. using `Preprocessor Macros`. These don't influence if the feature will actually be enabled, since that can also be done at runtime and some features are disabled automatically in the App Store or disabled by default in general.

The BITHockeyManager header file will still reference all modules, but accessing the modules will not be possible if excluded from the library.

Value of 1 includes the feature into the static library, 0 will exclude the feature from the static library.

Defaults:

Crash Reporting: HOCKEYSDK_FEATURE_CRASH_REPORTER 1
Feedback: HOCKEYSDK_FEATURE_FEEDBACK 1
App Store Updates: HOCKEYSDK_FEATURE_STORE_UPDATES 1 (This feature is disabled by default in code!)
Authenticator: HOCKEYSDK_FEATURE_AUTHENTICATOR 1
Beta Updates: HOCKEYSDK_FEATURE_UPDATES 1
Jira Mobile Connect: HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT 0
2013-09-11 19:18:21 +02:00
Andreas Linde
53d164d25d Update to custom PLCrashReporter v1.2 Beta 1 build with BIT namespace
- Adjust to new PLCR initialization scheme
- Don't enable PLCR if the app is starting with a debugger attached
- Add option to enable Mach exception handler. It is strongly discouraged to use this in release builds!
2013-08-31 13:19:52 +02:00
Andreas Linde
da3c5f2c4a Do not enable PLCrashReporter Exception or Signal handlers if the debugger is attached
This check is only done in non app store environment!
2013-08-17 16:01:05 +02:00
Andreas Linde
59db07771e Make sure not to process a crash report file that could not be parsed 2013-08-17 15:42:15 +02:00
Andreas Linde
81014659ed Remove deprecated log messages in crashmanager, since the delegate itself is already marked as being deprecated 2013-08-17 15:38:22 +02:00
Andreas Linde
88627a48b4 Guard PLCR initialization with dispatch_once instead of try/catch
PLCrashReporter may only be initialized once. So make sure the developer can't break this
2013-08-17 15:36:20 +02:00
Andreas Linde
6a27b6f453 Remove empty BITCrashManagerPrivate.h 2013-08-17 15:14:00 +02:00
Andreas Linde
0ce166c005 Document some more BITCrashManager methods 2013-08-17 14:57:58 +02:00
Andreas Linde
b6c77b8fb3 Integrate first test version of PLCrashReporter v1.2 with BIT namespace
Fixes #37
2013-07-21 21:11:22 +02:00
Andreas Linde
93c2f05fac Use Keychain for some data
- Added SFHFKeyChainUtils with BIT prefix
- Save username, email or userid (if provided by the app or the user) in the keychain instead of user defaults or property files
2013-05-09 16:45:58 +02:00
Andreas Linde
89fa399787 Fix double definition of private method and add handling for unlikely malloc failure 2013-05-09 13:43:41 +02:00
Andreas Linde
ec458234ea Minor analyzer fixes 2013-02-23 15:19:36 +01:00
Andreas Linde
9f2f40bc06 Update copyright 2013-01-04 14:44:44 +01:00
Andreas Linde
c754c9f68e Move calculation of time interval between startup and crash further up in the code
This allows the delegate, e.g. applicationLog, to know about the interval and e.g. include it in the log file
2012-11-27 20:43:49 +01:00
Andreas Linde
f211182f49 Add anonID to crash reports
CrashReporter Key is actually an anonymous ID for each device/installation where the crash occurred
2012-11-27 02:37:47 +01:00
Andreas Linde
2c4dc33f36 Call delegate also if a crash was detected but could not be read
If PLCrashReporter wrote a crash report, that could not be read, no delegate was fired. That could make the app stay in the start up maintenance screen, if it handles crashes on startup.
Though there was no report this ever happened, there is the theoretical chance this could.
2012-11-26 19:45:21 +01:00
Andreas Linde
31e680400e Fix potential crash if delegates return nil 2012-11-16 16:58:11 +01:00
Andreas Linde
a47c4b1bfd Fix compiler warnings 2012-11-07 16:25:22 +01:00
Andreas Linde
a14fa23f28 Convert to ARC 2012-10-23 16:22:23 +02:00
Andreas Linde
34f6e3faf4 Add installationIDs to feedback and crash reports, so those can be linked together and amount of affected users of a crash can be determined
Uses iOS 6 ASIdentifierManager class or identifierForVendor if the class is not available. Fallback on iOS 5 is to use app path UUID which is generated by iOS when installing the app
2012-10-19 18:16:24 +02:00
Andreas Linde
ed63a5a7b9 Send userID as extra value in crash reports and feedback if available 2012-10-19 17:34:23 +02:00
Andreas Linde
59a0319ea9 Update appName handling 2012-10-19 17:18:10 +02:00
Andreas Linde
7fdf39148f Use NSLog if non App Store environment for deprecated messages 2012-10-15 13:33:57 +02:00
Andreas Linde
1887ee7501 Also use old delegates in CrashManager for username and email if present, but mark them as deprecated 2012-10-12 16:56:44 +02:00
Andreas Linde
9b8f51fe5f Restructure project targets and binary distribution target
- Use one common static lib target
- create embeddedFramework as binary distribution including docset in one zip
- Add HockeySDK.xcconfig for easier build setting setup
- Move everything into a single directory, too many problems making binary and subproject work without requing recursive header search paths
- Documentation update pending
2012-10-07 21:49:47 +02:00
Andreas Linde
1a71aa2ea5 Initial Feedback component
- First implementation on feedback, not finished yet!
- Move all components into their own subdirectory
- Restructure common delegates into BITHockeyManagerDelegate
- Restructure common component methods into new superclass (not finished yet)
2012-09-28 12:30:19 +02:00
Andreas Linde
5428df4f45 Fix checking for new PLCrashReporter properties being available 2012-09-27 21:58:55 +02:00
Andreas Linde
13b918f9cd Add some error handler detection, to optionally notify the developer of multiple handlers that could cause crashes not to be reported to HockeyApp
Enable debugLogEnabled to get this warning.
2012-08-20 15:46:41 +02:00