├── .gitignore ├── Classes ├── BITHockeyManager.h ├── BITHockeyManager.m ├── BITHockeyManagerDelegate.h ├── BetaDistribution │ ├── BITSystemProfile.h │ ├── BITSystemProfile.m │ └── BITSystemProfilePrivate.h ├── CrashReporting │ ├── BITCrashCXXExceptionHandler.h │ ├── BITCrashCXXExceptionHandler.mm │ ├── BITCrashDetails.h │ ├── BITCrashDetails.m │ ├── BITCrashDetailsPrivate.h │ ├── BITCrashExceptionApplication.h │ ├── BITCrashExceptionApplication.m │ ├── BITCrashManager.h │ ├── BITCrashManager.m │ ├── BITCrashManagerDelegate.h │ ├── BITCrashManagerPrivate.h │ ├── BITCrashMetaData.h │ ├── BITCrashMetaData.m │ ├── BITCrashReportTextFormatter.h │ ├── BITCrashReportTextFormatter.m │ ├── BITCrashReportTextFormatterPrivate.h │ ├── BITCrashReportUI.h │ ├── BITCrashReportUI.m │ ├── BITCrashReportUI.xib │ ├── BITHockeyAttachment.h │ └── BITHockeyAttachment.m ├── Feedback │ ├── BITActivityIndicatorButton.h │ ├── BITActivityIndicatorButton.m │ ├── BITFeedbackManager.h │ ├── BITFeedbackManager.m │ ├── BITFeedbackManagerPrivate.h │ ├── BITFeedbackMessage.h │ ├── BITFeedbackMessage.m │ ├── BITFeedbackMessageAttachment.h │ ├── BITFeedbackMessageAttachment.m │ ├── BITFeedbackMessageCellView.h │ ├── BITFeedbackMessageCellView.m │ ├── BITFeedbackMessageCellViewDelegate.h │ ├── BITFeedbackMessageDateValueTransformer.h │ ├── BITFeedbackMessageDateValueTransformer.m │ ├── BITFeedbackWindowController.h │ ├── BITFeedbackWindowController.m │ └── BITFeedbackWindowController.xib ├── Helper │ ├── BITHockeyAppClient.h │ ├── BITHockeyAppClient.m │ ├── BITHockeyBaseManager.h │ ├── BITHockeyBaseManager.m │ ├── BITHockeyBaseManagerPrivate.h │ ├── BITHockeyHelper.h │ ├── BITHockeyHelper.m │ ├── BITHockeyLogger.h │ ├── BITHockeyLogger.m │ ├── BITHockeyLoggerPrivate.h │ ├── BITKeychainItem.h │ ├── BITKeychainItem.m │ ├── BITSDKColoredView.h │ ├── BITSDKColoredView.m │ ├── BITSDKTextFieldCell.h │ ├── BITSDKTextFieldCell.m │ ├── BITSDKTextView.h │ ├── BITSDKTextView.m │ ├── BITSDKTextViewDelegate.h │ ├── HockeySDKEnums.h │ └── HockeySDKNullability.h ├── HockeySDK.h ├── HockeySDKPrivate.h ├── HockeySDKPrivate.m └── Telemetry │ ├── BITApplication.h │ ├── BITApplication.m │ ├── BITBase.h │ ├── BITBase.m │ ├── BITCategoryContainer.h │ ├── BITCategoryContainer.m │ ├── BITChannel.h │ ├── BITChannel.m │ ├── BITChannelPrivate.h │ ├── BITData.h │ ├── BITData.m │ ├── BITDevice.h │ ├── BITDevice.m │ ├── BITDomain.h │ ├── BITDomain.m │ ├── BITEnvelope.h │ ├── BITEnvelope.m │ ├── BITEventData.h │ ├── BITEventData.m │ ├── BITGZIP.h │ ├── BITInternal.h │ ├── BITInternal.m │ ├── BITMetricsManager.h │ ├── BITMetricsManager.m │ ├── BITMetricsManagerPrivate.h │ ├── BITPersistence.h │ ├── BITPersistence.m │ ├── BITPersistencePrivate.h │ ├── BITSender.h │ ├── BITSender.m │ ├── BITSession.h │ ├── BITSession.m │ ├── BITSessionState.h │ ├── BITSessionStateData.h │ ├── BITSessionStateData.m │ ├── BITTelemetryContext.h │ ├── BITTelemetryContext.m │ ├── BITTelemetryData.h │ ├── BITTelemetryData.m │ ├── BITTelemetryObject.h │ ├── BITTelemetryObject.m │ ├── BITUser.h │ └── BITUser.m ├── Documentation ├── Guides │ ├── App Versioning.md │ ├── Changelog.md │ ├── Crash Reporting Not Working.md │ ├── Installation & Setup.md │ ├── Installation Mac App.md │ ├── Migration.md │ └── Upload Symbols.md └── HockeySDK │ └── .jazzy.yaml ├── HockeySDK-Mac.podspec ├── LICENSE.md ├── README.md ├── Resources ├── HockeySDK-Info.plist ├── HockeySDK-Prefix.pch ├── de.lproj │ └── HockeySDK.strings ├── en.lproj │ └── HockeySDK.strings ├── fi.lproj │ └── HockeySDK.strings ├── fr.lproj │ └── HockeySDK.strings ├── it.lproj │ └── HockeySDK.strings ├── ja.lproj │ └── HockeySDK.strings ├── nb.lproj │ └── HockeySDK.strings └── sv.lproj │ └── HockeySDK.strings ├── Support ├── BITPersistenceTests.m ├── HockeySDK.xcconfig ├── HockeySDK.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── HockeySDK.xcscmblueprint │ └── xcshareddata │ │ └── xcschemes │ │ ├── HockeySDK Distribution.xcscheme │ │ ├── HockeySDK Documentation.xcscheme │ │ ├── HockeySDK.xcscheme │ │ └── libHockeySDK.xcscheme ├── HockeySDKTests │ └── Info.plist ├── OCMock.framework │ ├── Headers │ ├── Modules │ ├── OCMock │ ├── Resources │ └── Versions │ │ ├── A │ │ ├── Headers │ │ │ ├── NSNotificationCenter+OCMAdditions.h │ │ │ ├── OCMArg.h │ │ │ ├── OCMConstraint.h │ │ │ ├── OCMFunctions.h │ │ │ ├── OCMLocation.h │ │ │ ├── OCMMacroState.h │ │ │ ├── OCMRecorder.h │ │ │ ├── OCMStubRecorder.h │ │ │ ├── OCMock.h │ │ │ └── OCMockObject.h │ │ ├── Modules │ │ │ └── module.modulemap │ │ ├── OCMock │ │ ├── Resources │ │ │ ├── Info.plist │ │ │ └── en.lproj │ │ │ │ └── InfoPlist.strings │ │ └── _CodeSignature │ │ │ └── CodeResources │ │ └── Current └── buildnumber.xcconfig └── Vendor └── CrashReporter ├── Headers ├── CrashReporter.h ├── PLCrashFeatureConfig.h ├── PLCrashMacros.h ├── PLCrashNamespace.h ├── PLCrashReport.h ├── PLCrashReportApplicationInfo.h ├── PLCrashReportBinaryImageInfo.h ├── PLCrashReportExceptionInfo.h ├── PLCrashReportFormatter.h ├── PLCrashReportMachExceptionInfo.h ├── PLCrashReportMachineInfo.h ├── PLCrashReportProcessInfo.h ├── PLCrashReportProcessorInfo.h ├── PLCrashReportRegisterInfo.h ├── PLCrashReportSignalInfo.h ├── PLCrashReportStackFrameInfo.h ├── PLCrashReportSymbolInfo.h ├── PLCrashReportSystemInfo.h ├── PLCrashReportTextFormatter.h ├── PLCrashReportThreadInfo.h ├── PLCrashReporter.h └── PLCrashReporterConfig.h └── libCrashReporter-MacOSX-Static.a /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | build/* 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode?v3 6 | !default.mode?v3 7 | *.perspective 8 | *.perspectivev3 9 | !default.perspectivev3 10 | !default.xcworkspace 11 | xcuserdata 12 | profile 13 | *.moved-aside 14 | 15 | # osx noise 16 | .DS_Store 17 | *.ipa 18 | *.swp 19 | *~.nib 20 | profile 21 | 22 | Documentation/HockeySDK/Generated/ 23 | Products 24 | -------------------------------------------------------------------------------- /Classes/BITHockeyManagerDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "BITCrashManagerDelegate.h" 3 | 4 | @class BITHockeyManager; 5 | @class BITHockeyBaseManager; 6 | 7 | /** 8 | The `BITHockeyManagerDelegate` formal protocol defines methods further configuring 9 | the behaviour of `BITHockeyManager`, as well as the delegate of the modules it manages. 10 | */ 11 | 12 | @protocol BITHockeyManagerDelegate 13 | 14 | @optional 15 | 16 | 17 | ///----------------------------------------------------------------------------- 18 | /// @name Additional meta data 19 | ///----------------------------------------------------------------------------- 20 | 21 | 22 | /** Return the userid that should used in the SDK components 23 | 24 | Right now this is used by the `BITCrashMananger` to attach to a crash report and `BITFeedbackManager`. 25 | 26 | You can find out the component requesting the user name like this: 27 | - (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITCrashManager *)componentManager { 28 | if (componentManager == crashManager) { 29 | return UserNameForFeedback; 30 | } else { 31 | return nil; 32 | } 33 | } 34 | 35 | 36 | 37 | @param hockeyManager The `BITHockeyManager` HockeyManager instance invoking this delegate 38 | @param componentManager The `BITCrashManager` component instance invoking this delegate 39 | @see [BITHockeyManager setUserID:] 40 | @see userNameForHockeyManager:componentManager: 41 | @see userEmailForHockeyManager:componentManager: 42 | */ 43 | - (NSString *)userIDForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager; 44 | 45 | 46 | /** Return the user name that should used in the SDK components 47 | 48 | Right now this is used by the `BITCrashMananger` to attach to a crash report and `BITFeedbackManager`. 49 | 50 | You can find out the component requesting the user name like this: 51 | - (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITCrashManager *)componentManager { 52 | if (componentManager == crashManager) { 53 | return UserNameForFeedback; 54 | } else { 55 | return nil; 56 | } 57 | } 58 | 59 | 60 | @param hockeyManager The `BITHockeyManager` HockeyManager instance invoking this delegate 61 | @param componentManager The `BITCrashManager` component instance invoking this delegate 62 | @see [BITHockeyManager setUserName:] 63 | @see userIDForHockeyManager:componentManager: 64 | @see userEmailForHockeyManager:componentManager: 65 | */ 66 | - (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager; 67 | 68 | 69 | /** Return the users email address that should used in the SDK components 70 | 71 | Right now this is used by the `BITCrashMananger` to attach to a crash report and `BITFeedbackManager`. 72 | 73 | You can find out the component requesting the user name like this: 74 | - (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITCrashManager *)componentManager { 75 | if (componentManager == hockeyManager.crashManager) { 76 | return UserNameForCrashReports; 77 | } else { 78 | return nil; 79 | } 80 | } 81 | 82 | 83 | @param hockeyManager The `BITHockeyManager` HockeyManager instance invoking this delegate 84 | @param componentManager The `BITCrashManager` component instance invoking this delegate 85 | @see [BITHockeyManager setUserEmail:] 86 | @see userIDForHockeyManager:componentManager: 87 | @see userNameForHockeyManager:componentManager: 88 | */ 89 | - (NSString *)userEmailForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager; 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /Classes/BetaDistribution/BITSystemProfile.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | * Helper class for accessing system information and measuring usage time 5 | */ 6 | @interface BITSystemProfile : NSObject 7 | 8 | ///----------------------------------------------------------------------------- 9 | /// @name Initialization 10 | ///----------------------------------------------------------------------------- 11 | 12 | /** 13 | * Returns a shared BITSystemProfile object 14 | * 15 | * @return A singleton BITSystemProfile instance ready use 16 | */ 17 | + (BITSystemProfile *)sharedSystemProfile; 18 | 19 | 20 | ///----------------------------------------------------------------------------- 21 | /// @name Generic 22 | ///----------------------------------------------------------------------------- 23 | 24 | /** 25 | * Return the current devices identifier 26 | * 27 | * @return NSString with the device identifier 28 | */ 29 | + (NSString *)deviceIdentifier; 30 | 31 | /** 32 | * Return the current device model 33 | * 34 | * @return NSString with the repesentation of the device model 35 | */ 36 | + (NSString *)deviceModel; 37 | 38 | /** 39 | * Return the system version of the current device 40 | * 41 | * @return NSString with the system version 42 | */ 43 | + (NSString *)systemVersionString; 44 | 45 | /** 46 | * Return an array with system data for a specific bundle 47 | * 48 | * @param bundle The app or framework bundle to get the system data from 49 | * 50 | * @return NSMutableArrray with system data 51 | */ 52 | - (NSMutableArray *)systemDataForBundle:(NSBundle *)bundle; 53 | 54 | /** 55 | * Return an array with system data 56 | * 57 | * @return NSMutableArray with system data 58 | */ 59 | - (NSMutableArray *)systemData; 60 | 61 | /** 62 | * Return an array with system usage data for a specific bundle 63 | * 64 | * @param bundle The app or framework bundle to get the usage data from 65 | * 66 | * @return NSMutableArray with system and bundle usage data 67 | */ 68 | - (NSMutableArray *)systemUsageDataForBundle:(NSBundle *)bundle; 69 | 70 | /** 71 | * Return an array with system usage data that can be used with Sparkle 72 | * 73 | * Call this method in the Sparkle delegate `feedParametersForUpdater:sendingSystemProfile:` 74 | * to attach system and app data to each Sparkle request 75 | * 76 | * @return NSMutableArray with system and app usage data 77 | */ 78 | - (NSMutableArray *)systemUsageData; 79 | 80 | 81 | ///----------------------------------------------------------------------------- 82 | /// @name Usage time 83 | ///----------------------------------------------------------------------------- 84 | 85 | /** 86 | * Start recording usage time for a specific app or framework bundle 87 | * 88 | * @param bundle The app or framework bundle to measure the usage time for 89 | */ 90 | - (void)startUsageForBundle:(NSBundle *)bundle; 91 | 92 | /** 93 | * Start recording usage time for the current app 94 | */ 95 | - (void)startUsage; 96 | 97 | /** 98 | * stop recording usage time 99 | */ 100 | - (void)stopUsage; 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /Classes/BetaDistribution/BITSystemProfilePrivate.h: -------------------------------------------------------------------------------- 1 | #define kBITUpdateDateOfVersionInstallation @"BITUpdateDateOfVersionInstallation" 2 | #define kBITUpdateUsageTimeOfCurrentVersion @"BITUpdateUsageTimeOfCurrentVersion" 3 | #define kBITUpdateUsageTimeForVersionString @"BITUpdateUsageTimeForVersionString" 4 | 5 | @interface BITSystemProfile () { 6 | } 7 | 8 | @property (nonatomic, copy) NSDate *usageStartTimestamp; 9 | 10 | @end -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashCXXExceptionHandler.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HockeySDKNullability.h" 3 | 4 | typedef struct { 5 | const void * __nullable exception; 6 | const char * __nullable exception_type_name; 7 | const char * __nullable exception_message; 8 | uint32_t exception_frames_count; 9 | const uintptr_t * __nonnull exception_frames; 10 | } BITCrashUncaughtCXXExceptionInfo; 11 | 12 | typedef void (*BITCrashUncaughtCXXExceptionHandler)( 13 | const BITCrashUncaughtCXXExceptionInfo * __nonnull info 14 | ); 15 | 16 | @interface BITCrashUncaughtCXXExceptionHandlerManager : NSObject 17 | 18 | + (void)addCXXExceptionHandler:(nonnull BITCrashUncaughtCXXExceptionHandler)handler; 19 | + (void)removeCXXExceptionHandler:(nonnull BITCrashUncaughtCXXExceptionHandler)handler; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashDetails.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | * Provides details about the crash that occured in the previous app session 5 | */ 6 | @interface BITCrashDetails : NSObject 7 | 8 | /** 9 | * UUID for the crash report 10 | */ 11 | @property (nonatomic, readonly, copy) NSString *incidentIdentifier; 12 | 13 | /** 14 | * UUID for the app installation on the device 15 | */ 16 | @property (nonatomic, readonly, copy) NSString *reporterKey; 17 | 18 | /** 19 | * Signal that caused the crash 20 | */ 21 | @property (nonatomic, readonly, copy) NSString *signal; 22 | 23 | /** 24 | * Exception name that triggered the crash, nil if the crash was not caused by an exception 25 | */ 26 | @property (nonatomic, readonly, copy) NSString *exceptionName; 27 | 28 | /** 29 | * Exception reason, nil if the crash was not caused by an exception 30 | */ 31 | @property (nonatomic, readonly, copy) NSString *exceptionReason; 32 | 33 | /** 34 | * Date and time the app started, nil if unknown 35 | */ 36 | @property (nonatomic, readonly, copy) NSDate *appStartTime; 37 | 38 | /** 39 | * Date and time the crash occured, nil if unknown 40 | */ 41 | @property (nonatomic, readonly, copy) NSDate *crashTime; 42 | 43 | /** 44 | * Operation System version string the app was running on when it crashed. 45 | */ 46 | @property (nonatomic, readonly, copy) NSString *osVersion; 47 | 48 | /** 49 | * Operation System build string the app was running on when it crashed 50 | * 51 | * This may be unavailable. 52 | */ 53 | @property (nonatomic, readonly, copy) NSString *osBuild; 54 | 55 | /** 56 | * CFBundleShortVersionString value of the app that crashed 57 | * 58 | * Can be `nil` if the crash was captured with an older version of the SDK 59 | * or if the app doesn't set the value. 60 | */ 61 | @property (nonatomic, readonly, copy) NSString *appVersion; 62 | 63 | /** 64 | * CFBundleVersion value of the app that crashed 65 | */ 66 | @property (nonatomic, readonly, copy) NSString *appBuild; 67 | 68 | /** 69 | * Identifier of the app process that crashed 70 | */ 71 | @property (nonatomic, readonly, assign) NSUInteger appProcessIdentifier; 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashDetails.m: -------------------------------------------------------------------------------- 1 | #import "BITCrashDetails.h" 2 | #import "BITCrashDetailsPrivate.h" 3 | 4 | @implementation BITCrashDetails 5 | 6 | - (instancetype)initWithIncidentIdentifier:(NSString *)incidentIdentifier 7 | reporterKey:(NSString *)reporterKey 8 | signal:(NSString *)signal 9 | exceptionName:(NSString *)exceptionName 10 | exceptionReason:(NSString *)exceptionReason 11 | appStartTime:(NSDate *)appStartTime 12 | crashTime:(NSDate *)crashTime 13 | osVersion:(NSString *)osVersion 14 | osBuild:(NSString *)osBuild 15 | appVersion:(NSString *)appVersion 16 | appBuild:(NSString *)appBuild 17 | appProcessIdentifier:(NSUInteger)appProcessIdentifier 18 | { 19 | if ((self = [super init])) { 20 | _incidentIdentifier = incidentIdentifier; 21 | _reporterKey = reporterKey; 22 | _signal = signal; 23 | _exceptionName = exceptionName; 24 | _exceptionReason = exceptionReason; 25 | _appStartTime = appStartTime; 26 | _crashTime = crashTime; 27 | _osVersion = osVersion; 28 | _osBuild = osBuild; 29 | _appVersion = appVersion; 30 | _appBuild = appBuild; 31 | _appProcessIdentifier = appProcessIdentifier; 32 | } 33 | return self; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashDetailsPrivate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface BITCrashDetails () { 4 | 5 | } 6 | 7 | - (instancetype)initWithIncidentIdentifier:(NSString *)incidentIdentifier 8 | reporterKey:(NSString *)reporterKey 9 | signal:(NSString *)signal 10 | exceptionName:(NSString *)exceptionName 11 | exceptionReason:(NSString *)exceptionReason 12 | appStartTime:(NSDate *)appStartTime 13 | crashTime:(NSDate *)crashTime 14 | osVersion:(NSString *)osVersion 15 | osBuild:(NSString *)osBuild 16 | appVersion:(NSString *)appVersion 17 | appBuild:(NSString *)appBuild 18 | appProcessIdentifier:(NSUInteger)appProcessIdentifier; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashExceptionApplication.m: -------------------------------------------------------------------------------- 1 | #import "BITCrashExceptionApplication.h" 2 | 3 | #import 4 | 5 | #import "BITHockeyManager.h" 6 | #import "BITHockeyHelper.h" 7 | #import "BITCrashManager.h" 8 | #import "BITCrashManagerPrivate.h" 9 | 10 | @implementation BITCrashExceptionApplication 11 | 12 | /* 13 | * Solution for Scenario 2 14 | * 15 | * Catch all exceptions that are being logged to the console and forward them to our 16 | * custom UncaughtExceptionHandler 17 | */ 18 | - (void)reportException:(NSException *)exception { 19 | [super reportException: exception]; 20 | 21 | // Don't invoke the registered UncaughtExceptionHandler if we are currently debugging this app! 22 | if (!bit_isDebuggerAttached() && exception) { 23 | // We forward this exception to PLCrashReporters UncaughtExceptionHandler 24 | // If the developer has implemented their own exception handler and that one is 25 | // invoked before PLCrashReporters exception handler and the developers 26 | // exception handler is invoking this method it will not finish it's tasks after this 27 | // call but directly jump into PLCrashReporters exception handler. 28 | // If we wouldn't do this, this call would lead to an infinite loop. 29 | 30 | NSUncaughtExceptionHandler *plcrExceptionHandler = [[BITHockeyManager sharedHockeyManager].crashManager plcrExceptionHandler]; 31 | if (plcrExceptionHandler) { 32 | plcrExceptionHandler(exception); 33 | } 34 | } 35 | } 36 | 37 | /* 38 | * Solution for Scenario 3 39 | * 40 | * Exceptions that happen inside an IBAction implementation do not trigger a call to 41 | * [NSApp reportException:] and it does not trigger a registered UncaughtExceptionHandler 42 | * Hence we need to catch these ourselves, e.g. by overwriting sendEvent: as done right here 43 | * 44 | * On 64bit systems the @try @catch block doesn't even cost any performance. 45 | */ 46 | - (void)sendEvent:(NSEvent *)theEvent { 47 | @try { 48 | [super sendEvent:theEvent]; 49 | } @catch (NSException *exception) { 50 | [self reportException:exception]; 51 | } 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashManagerPrivate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma clang diagnostic push 4 | #pragma clang diagnostic ignored "-Wdocumentation" 5 | #pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync" 6 | #import "CrashReporter.h" 7 | #pragma clang diagnostic pop 8 | 9 | // stores the set of crashreports that have been approved but aren't sent yet 10 | #define kHockeySDKApprovedCrashReports @"HockeySDKApprovedCrashReports" 11 | 12 | // stores the user name entered in the UI 13 | #define kHockeySDKUserName @"HockeySDKUserName" 14 | 15 | // stores the user email address entered in the UI 16 | #define kHockeySDKUserEmail @"HockeySDKUserEmail" 17 | 18 | 19 | @class BITHockeyAppClient; 20 | @class BITHockeyAttachment; 21 | 22 | 23 | @interface BITCrashManager () 24 | 25 | ///----------------------------------------------------------------------------- 26 | /// @name Delegate 27 | ///----------------------------------------------------------------------------- 28 | 29 | // delegate is required 30 | @property (nonatomic, unsafe_unretained) id delegate; 31 | 32 | @property (nonatomic, strong) BITHockeyAppClient *hockeyAppClient; 33 | 34 | @property (nonatomic, getter = isCrashManagerActivated) BOOL crashManagerActivated; 35 | 36 | @property (nonatomic) NSUncaughtExceptionHandler *plcrExceptionHandler; 37 | 38 | @property (nonatomic) PLCrashReporterCallbacks *crashCallBacks; 39 | 40 | @property (nonatomic, copy) NSString *lastCrashFilename; 41 | 42 | @property (nonatomic, copy, setter = setCrashReportUIHandler:) BITCustomCrashReportUIHandler crashReportUIHandler; 43 | 44 | @property (nonatomic, copy) NSString *crashesDir; 45 | 46 | - (NSString *)applicationName; 47 | - (NSString *)applicationVersion; 48 | 49 | - (void)handleCrashReport; 50 | - (BOOL)hasPendingCrashReport; 51 | 52 | - (instancetype)initWithAppIdentifier:(NSString *)appIdentifier hockeyAppClient:(BITHockeyAppClient *)hockeyAppClient NS_DESIGNATED_INITIALIZER; 53 | 54 | - (void)cleanCrashReports; 55 | - (NSString *)extractAppUUIDs:(BITPLCrashReport *)report; 56 | 57 | - (BOOL)persistAttachment:(BITHockeyAttachment *)attachment withFilename:(NSString *)filename; 58 | 59 | - (BITHockeyAttachment *)attachmentForCrashReport:(NSString *)filename; 60 | 61 | - (void)setLastCrashFilename:(NSString *)lastCrashFilename; 62 | 63 | /** 64 | * Initialize the crash reporter and check if there are any pending crash reports 65 | * 66 | * This method initializes the PLCrashReporter instance if it is not disabled. 67 | * It also checks if there are any pending crash reports available that should be send or 68 | * presented to the user. 69 | */ 70 | - (void)startManager; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashMetaData.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | /** 5 | * This class provides properties that can be attached to a crash report via a custom alert view flow 6 | */ 7 | @interface BITCrashMetaData : NSObject 8 | 9 | /** 10 | * User provided description that should be attached to the crash report as plain text 11 | */ 12 | @property (nonatomic, copy) NSString *userDescription; 13 | 14 | /** 15 | * User name that should be attached to the crash report 16 | */ 17 | @property (nonatomic, copy) NSString *userName; 18 | 19 | /** 20 | * User email that should be attached to the crash report 21 | */ 22 | @property (nonatomic, copy) NSString *userEmail; 23 | 24 | /** 25 | * User ID that should be attached to the crash report 26 | */ 27 | @property (nonatomic, copy) NSString *userID; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashMetaData.m: -------------------------------------------------------------------------------- 1 | #import "BITCrashMetaData.h" 2 | 3 | 4 | @implementation BITCrashMetaData 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashReportTextFormatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "PLCrashNamespace.h" 4 | #import "PLCrashReport.h" 5 | 6 | // Dictionary keys for array elements returned by arrayOfAppUUIDsForCrashReport: 7 | #ifndef kBITBinaryImageKeyUUID 8 | #define kBITBinaryImageKeyUUID @"uuid" 9 | #define kBITBinaryImageKeyArch @"arch" 10 | #define kBITBinaryImageKeyType @"type" 11 | #endif 12 | 13 | 14 | @interface BITCrashReportTextFormatter : NSObject { 15 | } 16 | 17 | + (NSString *)stringValueForCrashReport:(BITPLCrashReport *)report crashReporterKey:(NSString *)crashReporterKey; 18 | + (NSArray *)arrayOfAppUUIDsForCrashReport:(BITPLCrashReport *)report; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashReportTextFormatterPrivate.h: -------------------------------------------------------------------------------- 1 | #import "BITCrashReportTextFormatter.h" 2 | 3 | #ifndef BITCrashReportTextFormatterPrivate_h 4 | #define BITCrashReportTextFormatterPrivate_h 5 | 6 | @interface BITCrashReportTextFormatter () 7 | 8 | + (NSString *)anonymizedProcessPathFromProcessPath:(NSString *)processPath; 9 | 10 | @end 11 | 12 | #endif /* BITCrashReportTextFormatterPrivate_h */ -------------------------------------------------------------------------------- /Classes/CrashReporting/BITCrashReportUI.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BITCrashManager; 4 | 5 | @interface BITCrashReportUI : NSWindowController 6 | 7 | // defines the users name or user id 8 | @property (nonatomic, copy) NSString *userName; 9 | 10 | // defines the users email address 11 | @property (nonatomic, copy) NSString *userEmail; 12 | 13 | // set if the nib was loaded correctly 14 | @property (nonatomic, readonly) BOOL nibDidLoadSuccessfully; 15 | 16 | @property (nonatomic) BOOL showUserDetails; 17 | @property (nonatomic) BOOL showComments; 18 | @property (nonatomic) BOOL showDetails; 19 | 20 | - (instancetype)initWithManager:(BITCrashManager *)crashManager 21 | crashReport:(NSString *)crashReport 22 | logContent:(NSString *)logContent 23 | applicationName:(NSString *)applicationName 24 | askUserDetails:(BOOL)askUserDetails; 25 | 26 | - (void)askCrashReportDetails; 27 | 28 | - (IBAction)cancelReport:(id)sender; 29 | - (IBAction)submitReport:(id)sender; 30 | - (IBAction)showDetails:(id)sender; 31 | - (IBAction)hideDetails:(id)sender; 32 | - (IBAction)showComments:(id)sender; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITHockeyAttachment.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | Provides support to add binary attachments to crash reports 5 | 6 | This is used by `[BITCrashManagerDelegate attachmentForCrashManager:]` 7 | */ 8 | @interface BITHockeyAttachment : NSObject 9 | 10 | /** 11 | The filename the attachment should get 12 | */ 13 | @property (nonatomic, readonly, copy) NSString *filename; 14 | 15 | /** 16 | The attachment data as NSData object 17 | */ 18 | @property (nonatomic, readonly, strong) NSData *hockeyAttachmentData; 19 | 20 | /** 21 | The content type of your data as MIME type 22 | */ 23 | @property (nonatomic, readonly, copy) NSString *contentType; 24 | 25 | /** 26 | Create an BITHockeyAttachment instance with a given filename and NSData object 27 | 28 | @param filename The filename the attachment should get. If nil will get a automatically generated filename 29 | @param hockeyAttachmentData The attachment data as NSData. The instance will be ignore if this is set to nil! 30 | @param contentType The content type of your data as MIME type. If nil will be set to "application/octet-stream" 31 | 32 | @return An instsance of BITHockeyAttachment 33 | */ 34 | - (instancetype)initWithFilename:(NSString *)filename 35 | hockeyAttachmentData:(NSData *)hockeyAttachmentData 36 | contentType:(NSString *)contentType; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Classes/CrashReporting/BITHockeyAttachment.m: -------------------------------------------------------------------------------- 1 | #import "BITHockeyAttachment.h" 2 | 3 | @implementation BITHockeyAttachment 4 | 5 | - (instancetype)initWithFilename:(NSString *)filename 6 | hockeyAttachmentData:(NSData *)hockeyAttachmentData 7 | contentType:(NSString *)contentType 8 | { 9 | if ((self = [super init])) { 10 | _filename = filename; 11 | 12 | _hockeyAttachmentData = hockeyAttachmentData; 13 | 14 | if (contentType) { 15 | _contentType = contentType; 16 | } else { 17 | _contentType = @"application/octet-stream"; 18 | } 19 | } 20 | 21 | return self; 22 | } 23 | 24 | 25 | #pragma mark - NSCoder 26 | 27 | - (void)encodeWithCoder:(NSCoder *)encoder { 28 | if (self.filename) { 29 | [encoder encodeObject:self.filename forKey:@"filename"]; 30 | } 31 | if (self.hockeyAttachmentData) { 32 | [encoder encodeObject:self.hockeyAttachmentData forKey:@"data"]; 33 | } 34 | [encoder encodeObject:self.contentType forKey:@"contentType"]; 35 | } 36 | 37 | - (id)initWithCoder:(NSCoder *)decoder { 38 | if ((self = [super init])) { 39 | _filename = [decoder decodeObjectForKey:@"filename"]; 40 | _hockeyAttachmentData = [decoder decodeObjectForKey:@"data"]; 41 | _contentType = [decoder decodeObjectForKey:@"contentType"]; 42 | } 43 | return self; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Classes/Feedback/BITActivityIndicatorButton.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface BITActivityIndicatorButton : NSButton 4 | 5 | @property (nonatomic, strong) NSColor *bitBackgroundColor; 6 | 7 | - (void)setShowsActivityIndicator:(BOOL)showsIndicator; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Feedback/BITActivityIndicatorButton.m: -------------------------------------------------------------------------------- 1 | #import "BITActivityIndicatorButton.h" 2 | 3 | 4 | @interface BITActivityIndicatorButton() 5 | 6 | @property (nonatomic, strong) NSProgressIndicator *indicator; 7 | @property (nonatomic) BOOL indicatorVisible; 8 | 9 | @end 10 | 11 | 12 | @implementation BITActivityIndicatorButton 13 | 14 | - (instancetype)initWithFrame:(NSRect)frameRect { 15 | if ((self = [super initWithFrame:frameRect])) { 16 | _indicator = [[NSProgressIndicator alloc] initWithFrame:self.bounds]; 17 | 18 | [_indicator setStyle: NSProgressIndicatorSpinningStyle]; 19 | [_indicator setControlSize: NSSmallControlSize]; 20 | [_indicator sizeToFit]; 21 | 22 | _indicator.hidden = YES; 23 | 24 | [self addSubview:_indicator]; 25 | } 26 | return self; 27 | } 28 | 29 | - (void)setShowsActivityIndicator:(BOOL)showsIndicator { 30 | if (self.indicatorVisible == showsIndicator){ 31 | return; 32 | } 33 | 34 | self.indicatorVisible = showsIndicator; 35 | [[self cell] setBackgroundColor:self.bitBackgroundColor]; 36 | 37 | if (showsIndicator){ 38 | [self.indicator startAnimation:self]; 39 | [self.indicator setHidden:NO]; 40 | self.image = nil; 41 | } else { 42 | [self.indicator stopAnimation:self]; 43 | [self.indicator setHidden:YES]; 44 | } 45 | } 46 | 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackManagerPrivate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "BITFeedbackManager.h" 3 | #import "BITFeedbackMessage.h" 4 | 5 | @interface BITFeedbackManager () { 6 | } 7 | 8 | 9 | @property (nonatomic, strong) NSMutableArray *feedbackList; 10 | @property (nonatomic, copy) NSString *token; 11 | 12 | 13 | // used by BITHockeyManager if disable status is changed 14 | @property (nonatomic, getter = isFeedbackManagerDisabled) BOOL disableFeedbackManager; 15 | 16 | @property (nonatomic) BOOL didAskUserData; 17 | 18 | @property (nonatomic, strong) NSDate *lastCheck; 19 | @property (nonatomic, strong) NSDate *lastRefreshDate; 20 | 21 | @property (nonatomic, strong) NSNumber *lastMessageID; 22 | 23 | //@property (nonatomic, copy) NSString *userID; 24 | //@property (nonatomic, copy) NSString *userName; 25 | //@property (nonatomic, copy) NSString *userEmail; 26 | 27 | 28 | // load new messages from the server 29 | - (void)updateMessagesList; 30 | 31 | // load new messages from the server if the last request is too long ago 32 | - (void)updateMessagesListIfRequired; 33 | 34 | - (NSUInteger)numberOfMessages; 35 | - (BITFeedbackMessage *)messageAtIndex:(NSUInteger)index; 36 | 37 | - (void)submitMessageWithText:(NSString *)text andAttachments:(NSArray *)photos; 38 | - (void)submitPendingMessages; 39 | 40 | // Returns YES if manual user data can be entered, required or optional 41 | - (BOOL)askManualUserDataAvailable; 42 | 43 | // Returns YES if required user data is missing? 44 | - (BOOL)requireManualUserDataMissing; 45 | 46 | // Returns YES if optional user data is missing 47 | - (BOOL)optionalManualUserDataMissing; 48 | 49 | // Returns YES if user data is available and can be edited 50 | - (BOOL)isManualUserDataAvailable; 51 | 52 | // used in the user data screen 53 | - (void)updateDidAskUserData; 54 | 55 | 56 | - (BITFeedbackMessage *)messageWithID:(NSNumber *)messageID; 57 | 58 | - (NSArray *)messagesWithStatus:(BITFeedbackMessageStatus)status; 59 | 60 | - (void)saveMessages; 61 | 62 | - (void)fetchMessageUpdates; 63 | - (void)updateMessageListFromResponse:(NSDictionary *)jsonDictionary; 64 | 65 | - (BOOL)deleteMessageAtIndex:(NSUInteger)index; 66 | - (void)deleteAllMessages; 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackMessage.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BITFeedbackMessageAttachment; 4 | 5 | /** 6 | * Status for each feedback message 7 | */ 8 | typedef NS_ENUM(NSInteger, BITFeedbackMessageStatus) { 9 | /** 10 | * default and new messages from SDK per default 11 | */ 12 | BITFeedbackMessageStatusSendPending = 0, 13 | /** 14 | * message is in conflict, happens if the message is already stored on the server and tried sending it again 15 | */ 16 | BITFeedbackMessageStatusInConflict = 1, 17 | /** 18 | * sending of message is in progress 19 | */ 20 | BITFeedbackMessageStatusSendInProgress = 2, 21 | /** 22 | * new messages from server 23 | */ 24 | BITFeedbackMessageStatusUnread = 3, 25 | /** 26 | * messages from server once read and new local messages once successful send from SDK 27 | */ 28 | BITFeedbackMessageStatusRead = 4, 29 | /** 30 | * message is archived, happens if the thread is deleted from the server 31 | */ 32 | BITFeedbackMessageStatusArchived = 5 33 | }; 34 | 35 | 36 | /** 37 | * An individual feedback message 38 | */ 39 | @interface BITFeedbackMessage : NSObject 40 | 41 | @property (nonatomic, copy) NSString *text; 42 | @property (nonatomic, copy) NSString *userID; 43 | @property (nonatomic, copy) NSString *name; 44 | @property (nonatomic, copy) NSString *email; 45 | @property (nonatomic, copy) NSDate *date; 46 | @property (nonatomic, copy) NSNumber *messageID; 47 | @property (nonatomic, copy) NSString *token; 48 | @property (nonatomic, strong) NSArray *attachments; 49 | @property (nonatomic) BITFeedbackMessageStatus status; 50 | @property (nonatomic) BOOL userMessage; 51 | 52 | /** 53 | Delete local cached attachment data 54 | 55 | @warning This method must be called before a feedback message is deleted. 56 | */ 57 | - (void)deleteContents; 58 | 59 | /** 60 | Add an attachment to a message 61 | 62 | @param object BITFeedbackMessageAttachment instance representing the attachment that should be added 63 | */ 64 | - (void)addAttachmentsObject:(BITFeedbackMessageAttachment *)object; 65 | 66 | /** 67 | Return the attachments that can be viewed 68 | 69 | @return NSArray containing the attachment objects that can be previewed 70 | */ 71 | - (NSArray *)previewableAttachments; 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackMessage.m: -------------------------------------------------------------------------------- 1 | #import "BITFeedbackMessage.h" 2 | #import "BITFeedbackMessageAttachment.h" 3 | 4 | #import "HockeySDKPrivate.h" 5 | #import 6 | 7 | 8 | @implementation BITFeedbackMessage 9 | 10 | #pragma mark - NSObject 11 | 12 | - (id) init { 13 | if ((self = [super init])) { 14 | _text = nil; 15 | _userID = nil; 16 | _name = nil; 17 | _email = nil; 18 | _date = [[NSDate alloc] init]; 19 | _token = nil; 20 | _attachments = nil; 21 | _messageID = @0; 22 | _status = BITFeedbackMessageStatusSendPending; 23 | _userMessage = NO; 24 | } 25 | return self; 26 | } 27 | 28 | 29 | - (id)copyWithZone:(NSZone *)zone { 30 | BITFeedbackMessage *copy = [[[self class] allocWithZone: zone] init]; 31 | 32 | [copy setText: self.text]; 33 | [copy setUserID: self.userID]; 34 | [copy setName: self.name]; 35 | [copy setEmail: self.email]; 36 | [copy setDate: self.date]; 37 | [copy setToken: self.token]; 38 | [copy setMessageID: self.messageID]; 39 | [copy setStatus: self.status]; 40 | [copy setUserMessage: self.userMessage]; 41 | [copy setAttachments: self.attachments]; 42 | 43 | return copy; 44 | } 45 | 46 | 47 | #pragma mark - NSCoder 48 | 49 | - (void)encodeWithCoder:(NSCoder *)encoder { 50 | [encoder encodeObject:self.text forKey:@"text"]; 51 | [encoder encodeObject:self.userID forKey:@"userID"]; 52 | [encoder encodeObject:self.name forKey:@"name"]; 53 | [encoder encodeObject:self.email forKey:@"email"]; 54 | [encoder encodeObject:self.date forKey:@"date"]; 55 | [encoder encodeObject:self.messageID forKey:@"messageID"]; 56 | [encoder encodeObject:self.attachments forKey:@"attachments"]; 57 | [encoder encodeInteger:self.status forKey:@"status"]; 58 | [encoder encodeBool:self.userMessage forKey:@"userMessage"]; 59 | [encoder encodeObject:self.token forKey:@"token"]; 60 | } 61 | 62 | - (id)initWithCoder:(NSCoder *)decoder { 63 | if ((self = [super init])) { 64 | self.text = [decoder decodeObjectForKey:@"text"]; 65 | self.userID = [decoder decodeObjectForKey:@"userID"]; 66 | self.name = [decoder decodeObjectForKey:@"name"]; 67 | self.email = [decoder decodeObjectForKey:@"email"]; 68 | self.date = [decoder decodeObjectForKey:@"date"]; 69 | self.messageID = [decoder decodeObjectForKey:@"messageID"]; 70 | self.attachments = [decoder decodeObjectForKey:@"attachments"]; 71 | self.status = (BITFeedbackMessageStatus)[decoder decodeIntegerForKey:@"status"]; 72 | self.userMessage = [decoder decodeBoolForKey:@"userMessage"]; 73 | self.token = [decoder decodeObjectForKey:@"token"]; 74 | } 75 | return self; 76 | } 77 | 78 | 79 | #pragma mark - Deletion 80 | 81 | - (void)deleteContents { 82 | for (BITFeedbackMessageAttachment *attachment in self.attachments){ 83 | [attachment deleteContents]; 84 | } 85 | } 86 | 87 | - (NSArray *)previewableAttachments { 88 | NSMutableArray *returnArray = [NSMutableArray new]; 89 | 90 | for (BITFeedbackMessageAttachment *attachment in self.attachments) { 91 | if (!attachment.localURL && [self userMessage]) continue; 92 | 93 | NSImage *thumbnailImage = [[NSWorkspace sharedWorkspace] iconForFileType:[attachment.originalFilename pathExtension]]; 94 | if (!thumbnailImage) continue; 95 | 96 | if ([attachment thumbnailWithSize:CGSizeMake(BIT_ATTACHMENT_THUMBNAIL_LENGTH, BIT_ATTACHMENT_THUMBNAIL_LENGTH)]) { 97 | [returnArray addObject:attachment]; 98 | } 99 | } 100 | 101 | return returnArray; 102 | } 103 | 104 | - (void)addAttachmentsObject:(BITFeedbackMessageAttachment *)object{ 105 | if (!self.attachments) { 106 | self.attachments = @[]; 107 | } 108 | 109 | if (![object isKindOfClass:[BITFeedbackMessageAttachment class]]) return; 110 | 111 | self.attachments = [self.attachments arrayByAddingObject:object]; 112 | } 113 | 114 | @end 115 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackMessageAttachment.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import 4 | 5 | /** 6 | * An individual feedback message attachment 7 | */ 8 | @interface BITFeedbackMessageAttachment : NSObject 9 | 10 | @property (nonatomic, copy) NSNumber *identifier; 11 | @property (nonatomic, copy) NSString *originalFilename; 12 | @property (nonatomic, copy) NSString *contentType; 13 | @property (nonatomic, copy) NSString *sourceURL; 14 | @property (nonatomic) BOOL isLoading; 15 | @property (nonatomic, copy, readonly) NSData *data; 16 | 17 | 18 | @property (atomic, readonly) NSImage *thumbnailRepresentation; 19 | @property (weak, readonly) NSImage *imageRepresentation; 20 | 21 | 22 | + (BITFeedbackMessageAttachment *)attachmentWithData:(NSData *)data contentType:(NSString *)contentType; 23 | 24 | - (NSImage *)thumbnailWithSize:(NSSize)size; 25 | 26 | - (void)replaceData:(NSData *)data; 27 | 28 | - (void)deleteContents; 29 | 30 | - (BOOL)needsLoadingFromURL; 31 | 32 | - (BOOL)isImage; 33 | 34 | - (NSURL *)localURL; 35 | 36 | /** 37 | Used to determine whether QuickLook can preview this file or not. If not, we don't download it. 38 | */ 39 | - (NSString*)possibleFilename; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackMessageCellView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BITFeedbackMessage; 4 | @protocol BITFeedbackMessageCellViewDelegate; 5 | 6 | @interface BITFeedbackMessageCellView : NSTableCellView 7 | 8 | @property (nonatomic, strong) BITFeedbackMessage *message; 9 | @property (nonatomic, strong) NSTextField *messageTextField; 10 | @property (nonatomic, strong) NSTextField *dateTextField; 11 | 12 | - (instancetype)initWithFrame:(NSRect)frameRect delegate:(id)delegate; 13 | 14 | + (NSString *)identifier; 15 | + (CGFloat) heightForRowWithMessage:(BITFeedbackMessage *)message tableViewWidth:(CGFloat)width; 16 | 17 | - (void)updateAttachmentViews; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackMessageCellViewDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BITFeedbackMessageCellView; 4 | @class BITFeedbackMessageAttachment; 5 | 6 | @protocol BITFeedbackMessageCellViewDelegate 7 | 8 | - (void)messageCellView:(BITFeedbackMessageCellView *)messaggeCellView clickOnButton:(NSButton *)button withAttachment:(BITFeedbackMessageAttachment *)attachment; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackMessageDateValueTransformer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface BITFeedbackMessageDateValueTransformer : NSValueTransformer 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackMessageDateValueTransformer.m: -------------------------------------------------------------------------------- 1 | #import "BITFeedbackMessageDateValueTransformer.h" 2 | 3 | #import "HockeySDKPrivate.h" 4 | #import "BITFeedbackMessage.h" 5 | 6 | @implementation BITFeedbackMessageDateValueTransformer 7 | 8 | - (NSDateFormatter *)dateFormatter { 9 | static NSDateFormatter *dateFormatter = nil; 10 | 11 | static dispatch_once_t predDateFormatter; 12 | 13 | dispatch_once(&predDateFormatter, ^{ 14 | dateFormatter = [[NSDateFormatter alloc] init]; 15 | [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; 16 | [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; 17 | [dateFormatter setLocale:[NSLocale currentLocale]]; 18 | [dateFormatter setDoesRelativeDateFormatting:YES]; 19 | }); 20 | 21 | return dateFormatter; 22 | } 23 | 24 | - (NSDateFormatter *)timeFormatter { 25 | static NSDateFormatter *timeFormatter = nil; 26 | 27 | static dispatch_once_t predTimeFormatter; 28 | 29 | dispatch_once(&predTimeFormatter, ^{ 30 | timeFormatter = [[NSDateFormatter alloc] init]; 31 | [timeFormatter setTimeStyle:NSDateFormatterShortStyle]; 32 | [timeFormatter setDateStyle:NSDateFormatterNoStyle]; 33 | [timeFormatter setLocale:[NSLocale currentLocale]]; 34 | [timeFormatter setDoesRelativeDateFormatting:YES]; 35 | }); 36 | 37 | return timeFormatter; 38 | } 39 | 40 | - (BOOL)isSameDayWithDate1:(NSDate*)date1 date2:(NSDate*)date2 { 41 | NSCalendar* calendar = [NSCalendar currentCalendar]; 42 | 43 | unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit; 44 | NSDateComponents *dateComponent1 = [calendar components:unitFlags fromDate:date1]; 45 | NSDateComponents *dateComponent2 = [calendar components:unitFlags fromDate:date2]; 46 | 47 | return ([dateComponent1 day] == [dateComponent2 day] && 48 | [dateComponent1 month] == [dateComponent2 month] && 49 | [dateComponent1 year] == [dateComponent2 year]); 50 | } 51 | 52 | -(id)transformedValue:(id)message { 53 | NSString *result = @""; 54 | if (!message || ![message isKindOfClass:[BITFeedbackMessage class]]) { 55 | return nil; 56 | } 57 | BITFeedbackMessage *feedbackMessage = (BITFeedbackMessage *)message; 58 | 59 | if (feedbackMessage.status == BITFeedbackMessageStatusSendPending || 60 | feedbackMessage.status == BITFeedbackMessageStatusSendInProgress) { 61 | result = @"Pending"; 62 | } else if (feedbackMessage.date) { 63 | if ([self isSameDayWithDate1:[NSDate date] date2:feedbackMessage.date]) { 64 | result = [[self timeFormatter] stringFromDate:feedbackMessage.date]; 65 | } else { 66 | result = [NSString stringWithFormat:@"%@ %@", 67 | [[self dateFormatter] stringFromDate:feedbackMessage.date], 68 | [[self timeFormatter] stringFromDate:feedbackMessage.date]]; 69 | } 70 | } 71 | 72 | if (!feedbackMessage.userMessage && [feedbackMessage.name length] > 0) { 73 | result = [NSString stringWithFormat:@"%@ %@ %@", result, BITHockeyLocalizedString(@"FeedbackFrom", @""), feedbackMessage.name]; 74 | } 75 | 76 | return result; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Classes/Feedback/BITFeedbackWindowController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BITFeedbackManager; 4 | 5 | @interface BITFeedbackWindowController : NSWindowController 6 | 7 | - (id)initWithManager:(BITFeedbackManager *)feedbackManager; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyAppClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Stephan Diederich 3 | * 4 | * Copyright (c) 2013-2014 HockeyApp, Bit Stadium GmbH. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | extern NSString * const kBITHockeyAppClientBoundary; 32 | 33 | /** 34 | * Generic Hockey API client 35 | */ 36 | @interface BITHockeyAppClient : NSObject 37 | 38 | /** 39 | * designated initializer 40 | * 41 | * @param baseURL the baseURL of the HockeyApp instance 42 | */ 43 | - (instancetype) initWithBaseURL:(NSURL*) baseURL; 44 | 45 | /** 46 | * baseURL to which relative paths are appended 47 | */ 48 | @property (nonatomic, strong) NSURL *baseURL; 49 | 50 | /** 51 | * creates an NRURLRequest for the given method and path by using 52 | * the internally stored baseURL. 53 | * 54 | * @param method the HTTPMethod to check, must not be nil 55 | * @param params parameters for the request (only supported for GET and POST for now) 56 | * @param path path to append to baseURL. can be nil in which case "/" is appended 57 | * 58 | * @return an NSMutableURLRequest for further configuration 59 | */ 60 | - (NSMutableURLRequest *) requestWithMethod:(NSString*) method 61 | path:(NSString *) path 62 | parameters:(NSDictionary *) params; 63 | 64 | /** 65 | * Access to the internal operation queue 66 | */ 67 | @property (nonatomic, strong) NSOperationQueue *operationQueue; 68 | 69 | #pragma mark - Helpers 70 | /** 71 | * create a post body from the given value, key and boundary. This is a convenience call to 72 | * dataWithPostValue:forKey:contentType:boundary and aimed at NSString-content. 73 | * 74 | * @param value - 75 | * @param key - 76 | * @param boundary - 77 | * 78 | * @return NSData instance configured to be attached on a (post) URLRequest 79 | */ 80 | + (NSData *)dataWithPostValue:(NSString *)value forKey:(NSString *)key boundary:(NSString *) boundary; 81 | 82 | /** 83 | * create a post body from the given value, key and boundary and content type. 84 | * 85 | * @param value - 86 | * @param key - 87 | *@param contentType - 88 | * @param boundary - 89 | * @param filename - 90 | * 91 | * @return NSData instance configured to be attached on a (post) URLRequest 92 | */ 93 | + (NSData *)dataWithPostValue:(NSData *)value forKey:(NSString *)key contentType:(NSString *)contentType boundary:(NSString *) boundary filename:(NSString *)filename; 94 | 95 | @end 96 | 97 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyBaseManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | The internal superclass for all component managers 5 | 6 | */ 7 | 8 | @interface BITHockeyBaseManager : NSObject 9 | 10 | ///----------------------------------------------------------------------------- 11 | /// @name Modules 12 | ///----------------------------------------------------------------------------- 13 | 14 | 15 | /** 16 | Defines the server URL to send data to or request data from 17 | 18 | By default this is set to the HockeyApp servers and there rarely should be a 19 | need to modify that. 20 | */ 21 | @property (nonatomic, copy) NSString *serverURL; 22 | 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyBaseManager.m: -------------------------------------------------------------------------------- 1 | #import "HockeySDK.h" 2 | #import "HockeySDKPrivate.h" 3 | 4 | #import "BITHockeyHelper.h" 5 | 6 | #import "BITHockeyBaseManager.h" 7 | #import "BITHockeyBaseManagerPrivate.h" 8 | 9 | #import 10 | #import 11 | 12 | @interface BITHockeyBaseManager() 13 | 14 | @property(nonatomic, strong) NSDateFormatter *rfc3339Formatter; 15 | 16 | @end 17 | 18 | @implementation BITHockeyBaseManager 19 | 20 | - (id)init { 21 | if ((self = [super init])) { 22 | _appIdentifier = nil; 23 | _serverURL = kBITHockeySDKURL; 24 | _userID = nil; 25 | _userName = nil; 26 | _userEmail = nil; 27 | 28 | NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; 29 | _rfc3339Formatter = [[NSDateFormatter alloc] init]; 30 | [_rfc3339Formatter setLocale:enUSPOSIXLocale]; 31 | [_rfc3339Formatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"]; 32 | [_rfc3339Formatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; 33 | } 34 | return self; 35 | } 36 | 37 | - (id)initWithAppIdentifier:(NSString *)appIdentifier { 38 | if ((self = [self init])) { 39 | _appIdentifier = appIdentifier; 40 | } 41 | return self; 42 | } 43 | 44 | 45 | 46 | #pragma mark - Private 47 | 48 | - (void)reportError:(NSError *)error { 49 | BITHockeyLogError(@"ERROR: %@", [error localizedDescription]); 50 | } 51 | 52 | - (NSString *)encodedAppIdentifier { 53 | return (self.appIdentifier ? bit_URLEncodedString(self.appIdentifier) : bit_URLEncodedString([[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"])); 54 | } 55 | 56 | - (NSString *)getDevicePlatform { 57 | size_t size; 58 | sysctlbyname("hw.machine", NULL, &size, NULL, 0); 59 | char *answer = (char*)malloc(size); 60 | sysctlbyname("hw.machine", answer, &size, NULL, 0); 61 | NSString *platform = @(answer); 62 | free(answer); 63 | return platform; 64 | } 65 | 66 | 67 | #pragma mark - Manager Control 68 | 69 | - (void)startManager { 70 | } 71 | 72 | 73 | #pragma mark - Helpers 74 | 75 | - (NSDate *)parseRFC3339Date:(NSString *)dateString { 76 | NSDate *date = nil; 77 | NSError *error = nil; 78 | if (![self.rfc3339Formatter getObjectValue:&date forString:dateString range:nil error:&error]) { 79 | BITHockeyLogDebug(@"INFO: Invalid date '%@' string: %@", dateString, error); 80 | } 81 | 82 | return date; 83 | } 84 | 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyBaseManagerPrivate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "BITHockeyBaseManager.h" 4 | 5 | @interface BITHockeyBaseManager () 6 | 7 | @property (nonatomic, copy) NSString *appIdentifier; 8 | @property (nonatomic, copy) NSString *userID; 9 | @property (nonatomic, copy) NSString *userName; 10 | @property (nonatomic, copy) NSString *userEmail; 11 | 12 | - (id)initWithAppIdentifier:(NSString *)appIdentifier; 13 | 14 | - (void)startManager; 15 | 16 | - (void)reportError:(NSError *)error; 17 | - (NSString *)encodedAppIdentifier; 18 | 19 | - (NSString *)getDevicePlatform; 20 | //- (NSString *)executableUUID; 21 | 22 | - (NSDate *)parseRFC3339Date:(NSString *)dateString; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyHelper.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT NSString *const kBITExcludeApplicationSupportFromBackup; 4 | 5 | /* NSString helpers */ 6 | NSString *bit_URLEncodedString(NSString *inputString); 7 | NSString *bit_URLDecodedString(NSString *inputString); 8 | NSComparisonResult bit_versionCompare(NSString *stringA, NSString *stringB); 9 | NSString *bit_mainBundleIdentifier(void); 10 | NSString *bit_appIdentifierToGuid(NSString *appIdentifier); 11 | NSString *bit_appName(NSString *placeHolderString); 12 | 13 | NSString *bit_appAnonID(BOOL forceNewAnonID); 14 | NSString *bit_UUID(void); 15 | 16 | NSString *bit_settingsDir(void); 17 | 18 | BOOL bit_addStringValueToKeychain(NSString *stringValue, NSString *key); 19 | NSString *bit_stringValueFromKeychainForKey(NSString *key); 20 | BOOL bit_removeKeyFromKeychain(NSString *key); 21 | BOOL bit_isDebuggerAttached(void); 22 | 23 | /* Context helpers */ 24 | NSString *bit_utcDateString(NSDate *date); 25 | NSString *bit_devicePlatform(void); 26 | NSString *bit_devicePlatform(void); 27 | NSString *bit_deviceType(void); 28 | NSString *bit_osVersionBuild(void); 29 | NSString *bit_osName(void); 30 | NSString *bit_deviceLocale(void); 31 | NSString *bit_deviceLanguage(void); 32 | NSString *bit_screenSize(void); 33 | NSString *bit_sdkVersion(void); 34 | NSString *bit_appVersion(void); 35 | 36 | /* Fix bug where Application Support was excluded from backup. */ 37 | void bit_fixBackupAttributeForURL(NSURL *directoryURL); 38 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyLogger.h: -------------------------------------------------------------------------------- 1 | // Adapted from 0xced’s post at http://stackoverflow.com/questions/34732814/how-should-i-handle-logs-in-an-objective-c-library/34732815#34732815 2 | 3 | #import 4 | #import "HockeySDKEnums.h" 5 | 6 | #define BITHockeyLog(_level, _message) [BITHockeyLogger logMessage:_message level:_level file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__] 7 | 8 | #define BITHockeyLogError(format, ...) BITHockeyLog(BITLogLevelError, (^{ return [NSString stringWithFormat:(format), ##__VA_ARGS__]; })) 9 | #define BITHockeyLogWarning(format, ...) BITHockeyLog(BITLogLevelWarning, (^{ return [NSString stringWithFormat:(format), ##__VA_ARGS__]; })) 10 | #define BITHockeyLogDebug(format, ...) BITHockeyLog(BITLogLevelDebug, (^{ return [NSString stringWithFormat:(format), ##__VA_ARGS__]; })) 11 | #define BITHockeyLogVerbose(format, ...) BITHockeyLog(BITLogLevelVerbose, (^{ return [NSString stringWithFormat:(format), ##__VA_ARGS__]; })) 12 | 13 | @interface BITHockeyLogger : NSObject 14 | 15 | + (BITLogLevel)currentLogLevel; 16 | + (void)setCurrentLogLevel:(BITLogLevel)currentLogLevel; 17 | + (void)setLogHandler:(BITLogHandler)logHandler; 18 | 19 | + (void)logMessage:(BITLogMessageProvider)messageProvider level:(BITLogLevel)loglevel file:(const char *)file function:(const char *)function line:(uint)line; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyLogger.m: -------------------------------------------------------------------------------- 1 | #import "BITHockeyLogger.h" 2 | #import "HockeySDK.h" 3 | 4 | @implementation BITHockeyLogger 5 | 6 | static BITLogLevel _currentLogLevel = BITLogLevelWarning; 7 | static BITLogHandler currentLogHandler; 8 | 9 | static BITLogHandler defaultLogHandler = ^(BITLogMessageProvider messageProvider, BITLogLevel logLevel, const char * __unused file, const char *function, uint line) { 10 | if (messageProvider) { 11 | if (_currentLogLevel < logLevel) { 12 | return; 13 | } 14 | NSString *functionString = [NSString stringWithUTF8String:function]; 15 | NSLog((@"[HockeySDK] %@/%d %@"), functionString, line, messageProvider()); 16 | } 17 | }; 18 | 19 | 20 | + (void)initialize { 21 | currentLogHandler = defaultLogHandler; 22 | } 23 | 24 | + (BITLogLevel)currentLogLevel { 25 | return _currentLogLevel; 26 | } 27 | 28 | + (void)setCurrentLogLevel:(BITLogLevel)currentLogLevel { 29 | _currentLogLevel = currentLogLevel; 30 | } 31 | 32 | + (void)setLogHandler:(BITLogHandler)logHandler { 33 | currentLogHandler = logHandler; 34 | } 35 | 36 | + (void)logMessage:(BITLogMessageProvider)messageProvider level:(BITLogLevel)loglevel file:(const char *)file function:(const char *)function line:(uint)line { 37 | if (currentLogHandler) { 38 | currentLogHandler(messageProvider, loglevel, file, function, line); 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/Helper/BITHockeyLoggerPrivate.h: -------------------------------------------------------------------------------- 1 | #import "BITHockeyLogger.h" 2 | 3 | FOUNDATION_EXPORT BITLogHandler const defaultLogHandler; 4 | -------------------------------------------------------------------------------- /Classes/Helper/BITSDKColoredView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface BITSDKColoredView : NSView 4 | 5 | @property (nonatomic, strong) NSColor *viewBackgroundColor; 6 | @property (nonatomic, strong) NSColor *viewBorderColor; 7 | @property (nonatomic) CGFloat viewBorderWidth; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Helper/BITSDKColoredView.m: -------------------------------------------------------------------------------- 1 | #import "BITSDKColoredView.h" 2 | 3 | @implementation BITSDKColoredView 4 | 5 | - (void)drawRect:(NSRect)dirtyRect { 6 | if (self.viewBackgroundColor) { 7 | [self.viewBackgroundColor setFill]; 8 | NSRectFill(dirtyRect); 9 | } 10 | 11 | if (self.viewBorderWidth > 0 && self.viewBorderColor) { 12 | [self setWantsLayer:YES]; 13 | self.layer.masksToBounds = YES; 14 | self.layer.borderWidth = self.viewBorderWidth; 15 | 16 | // Convert to CGColorRef 17 | const NSInteger numberOfComponents = [self.viewBorderColor numberOfComponents]; 18 | #pragma clang diagnostic push 19 | #pragma clang diagnostic ignored "-Wvla" 20 | CGFloat components[numberOfComponents]; 21 | #pragma clang diagnostic pop 22 | [self.viewBorderColor getComponents:(CGFloat *)&components]; 23 | CGColorSpaceRef colorSpace = [[self.viewBorderColor colorSpace] CGColorSpace]; 24 | CGColorRef orangeCGColor = CGColorCreate(colorSpace, components); 25 | 26 | self.layer.borderColor = orangeCGColor; 27 | CGColorRelease(orangeCGColor); 28 | } 29 | 30 | [super drawRect:dirtyRect]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Classes/Helper/BITSDKTextFieldCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface BITSDKTextFieldCell : NSTextFieldCell 4 | 5 | @property (nonatomic, strong) NSNumber *horizontalInset; 6 | 7 | - (void)setBitPlaceHolderString:(NSString *)bitPlaceHolderString; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Helper/BITSDKTextFieldCell.m: -------------------------------------------------------------------------------- 1 | #import "BITSDKTextFieldCell.h" 2 | 3 | @implementation BITSDKTextFieldCell 4 | 5 | - (NSRect)drawingRectForBounds:(NSRect)theRect { 6 | // Get the parent's idea of where we should draw 7 | NSRect newRect = [super drawingRectForBounds:theRect]; 8 | NSSize textSize = [self cellSizeForBounds:theRect]; 9 | 10 | CGFloat heightDelta = newRect.size.height - textSize.height; 11 | if (heightDelta > 0) { 12 | newRect.size.height -= heightDelta; 13 | newRect.origin.y += heightDelta / 2; 14 | if (self.horizontalInset) { 15 | #if CGFLOAT_IS_DOUBLE 16 | CGFloat horizontalInset = [self.horizontalInset doubleValue]; 17 | #else 18 | CGFloat horizontalInset = [self.horizontalInset floatValue]; 19 | #endif 20 | newRect.origin.x += horizontalInset; 21 | newRect.size.width -= (horizontalInset * 2); 22 | } 23 | } 24 | 25 | return newRect; 26 | } 27 | 28 | - (void)setBitPlaceHolderString:(NSString *)bitPlaceHolderString { 29 | self.placeholderString = bitPlaceHolderString; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Classes/Helper/BITSDKTextView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "BITSDKTextViewDelegate.h" 4 | 5 | @interface BITSDKTextView : NSTextView 6 | 7 | @property (nonatomic, copy) NSString *placeHolderString; 8 | 9 | @property (nonatomic, unsafe_unretained) id bitDelegate; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Classes/Helper/BITSDKTextView.m: -------------------------------------------------------------------------------- 1 | #import "BITSDKTextView.h" 2 | 3 | @implementation BITSDKTextView 4 | 5 | - (void)drawRect:(NSRect)rect { 6 | [super drawRect:rect]; 7 | if ([[self string] isEqualToString:@""] && self != [[self window] firstResponder]) { 8 | if (self.placeHolderString) { 9 | NSColor *txtColor = [NSColor colorWithCalibratedRed:0.69 green:0.71 blue:0.73 alpha:1.0]; 10 | NSDictionary *dict = @{NSForegroundColorAttributeName: txtColor}; 11 | NSAttributedString *placeholder = [[NSAttributedString alloc] initWithString:self.placeHolderString attributes:dict]; 12 | [placeholder drawAtPoint:NSMakePoint(0,0)]; 13 | } 14 | } 15 | } 16 | 17 | - (BOOL)becomeFirstResponder { 18 | [self setNeedsDisplay:YES]; 19 | return [super becomeFirstResponder]; 20 | } 21 | 22 | - (BOOL)resignFirstResponder { 23 | [self setNeedsDisplay:YES]; 24 | return [super resignFirstResponder]; 25 | } 26 | 27 | 28 | #pragma mark - Drag & Drop for Attachments 29 | 30 | - (NSDragOperation)draggingEntered:(id)sender { 31 | NSPasteboard *pb = [sender draggingPasteboard]; 32 | NSDragOperation dragOperation = [sender draggingSourceOperationMask]; 33 | 34 | if ([[pb types] containsObject:NSFilenamesPboardType]) { 35 | if (dragOperation & NSDragOperationCopy) { 36 | return NSDragOperationCopy; 37 | } 38 | } 39 | 40 | return NSDragOperationNone; 41 | } 42 | 43 | - (BOOL)performDragOperation:(id)sender { 44 | NSPasteboard *pb = [sender draggingPasteboard]; 45 | 46 | if ( [[pb types] containsObject:NSFilenamesPboardType] ) { 47 | NSFileManager *fm = [[NSFileManager alloc] init]; 48 | 49 | NSArray *filenames = [pb propertyListForType:NSFilenamesPboardType]; 50 | 51 | BOOL fileFound = NO; 52 | 53 | for (NSString *filename in filenames) { 54 | BOOL isDir = NO; 55 | if (![fm fileExistsAtPath:filename isDirectory:&isDir] || isDir) continue; 56 | 57 | fileFound = YES; 58 | 59 | if (self.bitDelegate && [self.bitDelegate respondsToSelector:@selector(textView:dragOperationWithFilename:)]) { 60 | [self.bitDelegate textView:self dragOperationWithFilename:filename]; 61 | } 62 | } 63 | return fileFound; 64 | } 65 | 66 | return NO; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Classes/Helper/BITSDKTextViewDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BITSDKTextView; 4 | 5 | @protocol BITSDKTextViewDelegate 6 | 7 | - (void)textView:(BITSDKTextView *)textView dragOperationWithFilename:(NSString *)filename; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Helper/HockeySDKEnums.h: -------------------------------------------------------------------------------- 1 | #ifndef HockeySDKEnums_h 2 | #define HockeySDKEnums_h 3 | 4 | /** 5 | * HockeySDK Log Levels 6 | */ 7 | typedef NS_ENUM(NSUInteger, BITLogLevel) { 8 | /** 9 | * Logging is disabled 10 | */ 11 | BITLogLevelNone = 0, 12 | /** 13 | * Only errors will be logged 14 | */ 15 | BITLogLevelError = 1, 16 | /** 17 | * Errors and warnings will be logged 18 | */ 19 | BITLogLevelWarning = 2, 20 | /** 21 | * Debug information will be logged 22 | */ 23 | BITLogLevelDebug = 3, 24 | /** 25 | * Logging will be very chatty 26 | */ 27 | BITLogLevelVerbose = 4 28 | }; 29 | 30 | typedef NSString *(^BITLogMessageProvider)(void); 31 | typedef void (^BITLogHandler)(BITLogMessageProvider messageProvider, BITLogLevel logLevel, const char *file, const char *function, uint line); 32 | 33 | #endif /* HockeySDKEnums_h */ 34 | -------------------------------------------------------------------------------- /Classes/Helper/HockeySDKNullability.h: -------------------------------------------------------------------------------- 1 | // 2 | // HockeySDKNullability.h 3 | // HockeySDK 4 | // 5 | // Created by Andreas Linde on 12/06/15. 6 | // 7 | // 8 | 9 | #ifndef HockeySDK_HockeyNullability_h 10 | #define HockeySDK_HockeyNullability_h 11 | 12 | // Define nullability fallback for backwards compatibility 13 | #if !__has_feature(nullability) 14 | #define NS_ASSUME_NONNULL_BEGIN 15 | #define NS_ASSUME_NONNULL_END 16 | #define nullable 17 | #define nonnull 18 | #define null_unspecified 19 | #define null_resettable 20 | #define __nullable 21 | #define __nonnull 22 | #define __null_unspecified 23 | #endif 24 | 25 | // Fallback for convenience syntax which might not be available in older SDKs 26 | #ifndef NS_ASSUME_NONNULL_BEGIN 27 | #define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") 28 | #endif 29 | #ifndef NS_ASSUME_NONNULL_END 30 | #define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Classes/HockeySDK.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "HockeySDKEnums.h" 4 | 5 | #import "BITHockeyManager.h" 6 | #import "BITHockeyManagerDelegate.h" 7 | 8 | #import "BITHockeyAttachment.h" 9 | 10 | #import "BITCrashManager.h" 11 | #import "BITCrashManagerDelegate.h" 12 | #import "BITCrashDetails.h" 13 | #import "BITCrashMetaData.h" 14 | #import "BITCrashExceptionApplication.h" 15 | 16 | #import "BITSystemProfile.h" 17 | 18 | #import "BITFeedbackManager.h" 19 | #import "BITFeedbackWindowController.h" 20 | 21 | #import "BITMetricsManager.h" 22 | 23 | // Notification message which HockeyManager is listening to, to retry requesting updated from the server 24 | #define BITHockeyNetworkDidBecomeReachableNotification @"BITHockeyNetworkDidBecomeReachable" 25 | 26 | extern NSString *const kBITDefaultUserID; 27 | extern NSString *const kBITDefaultUserName; 28 | extern NSString *const kBITDefaultUserEmail; 29 | 30 | /** 31 | * HockeySDK Crash Reporter error domain 32 | */ 33 | typedef NS_ENUM (NSInteger, BITCrashErrorReason) { 34 | /** 35 | * Unknown error 36 | */ 37 | BITCrashErrorUnknown, 38 | /** 39 | * API Server rejected app version 40 | */ 41 | BITCrashAPIAppVersionRejected, 42 | /** 43 | * API Server returned empty response 44 | */ 45 | BITCrashAPIReceivedEmptyResponse, 46 | /** 47 | * Connection error with status code 48 | */ 49 | BITCrashAPIErrorWithStatusCode 50 | }; 51 | extern NSString *const kBITCrashErrorDomain; 52 | 53 | 54 | /** 55 | * HockeySDK Feedback error domain 56 | */ 57 | typedef NS_ENUM(NSInteger, BITFeedbackErrorReason) { 58 | /** 59 | * Unknown error 60 | */ 61 | BITFeedbackErrorUnknown, 62 | /** 63 | * API Server returned invalid status 64 | */ 65 | BITFeedbackAPIServerReturnedInvalidStatus, 66 | /** 67 | * API Server returned invalid data 68 | */ 69 | BITFeedbackAPIServerReturnedInvalidData, 70 | /** 71 | * API Server returned empty response 72 | */ 73 | BITFeedbackAPIServerReturnedEmptyResponse, 74 | /** 75 | * Authorization secret missing 76 | */ 77 | BITFeedbackAPIClientAuthorizationMissingSecret, 78 | /** 79 | * No internet connection 80 | */ 81 | BITFeedbackAPIClientCannotCreateConnection 82 | }; 83 | extern NSString *const kBITFeedbackErrorDomain; 84 | 85 | 86 | /** 87 | * HockeySDK global error domain 88 | */ 89 | typedef NS_ENUM(NSInteger, BITHockeyErrorReason) { 90 | /** 91 | * Unknown error 92 | */ 93 | BITHockeyErrorUnknown 94 | }; 95 | extern NSString *const __attribute__((unused)) kBITHockeyErrorDomain; 96 | // HockeySDK 97 | -------------------------------------------------------------------------------- /Classes/HockeySDKPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // HockeySDKPrivate.h 3 | // HockeySDK 4 | // 5 | // Created by Andreas Linde on 02.09.13. 6 | // 7 | // 8 | 9 | #import "BITHockeyLogger.h" 10 | 11 | #ifndef HockeySDK_HockeySDKPrivate_h 12 | #define HockeySDK_HockeySDKPrivate_h 13 | 14 | #define BITHOCKEY_NAME @"HockeySDK" 15 | #define BITHOCKEY_IDENTIFIER @"net.hockeyapp.sdk.mac" 16 | #define BITHOCKEY_CRASH_SETTINGS @"BITCrashManager.plist" 17 | #define BITHOCKEY_CRASH_ANALYZER @"BITCrashManager.analyzer" 18 | 19 | #define BITHOCKEY_FEEDBACK_SETTINGS @"BITFeedbackManager.plist" 20 | 21 | #define BITHOCKEY_INTEGRATIONFLOW_TIMESTAMP @"BITIntegrationFlowStartTimestamp" 22 | 23 | #define BITHockeyBundle [NSBundle bundleWithIdentifier:BITHOCKEY_IDENTIFIER] 24 | #define BITHOCKEYSDK_URL @"https://sdk.hockeyapp.net/" 25 | extern NSString *const kBITHockeySDKURL; 26 | 27 | extern NSString *const kBITFeedbackAttachmentLoadedNotification; 28 | extern NSString *const kBITFeedbackAttachmentLoadedKey; 29 | 30 | #define BITHockeyLocalizedString(key,comment) (NSLocalizedStringFromTableInBundle(key, @"HockeySDK", BITHockeyBundle, comment) ?: @"") 31 | 32 | #define BIT_RGBCOLOR(r,g,b) [NSColor colorWithCalibratedRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1] 33 | 34 | #define BIT_ATTACHMENT_THUMBNAIL_LENGTH 45 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Classes/HockeySDKPrivate.m: -------------------------------------------------------------------------------- 1 | #import "HockeySDK.h" 2 | #import "HockeySDKPrivate.h" 3 | #include 4 | 5 | NSString *const kBITCrashErrorDomain = @"BITCrashReporterErrorDomain"; 6 | NSString *const kBITFeedbackErrorDomain = @"BITFeedbackErrorDomain"; 7 | NSString *const kBITHockeyErrorDomain = @"BITHockeyErrorDomain"; 8 | 9 | NSString *const kBITDefaultUserID = @"default.BITMetaUserID"; 10 | NSString *const kBITDefaultUserName = @"default.BITMetaUserName"; 11 | NSString *const kBITDefaultUserEmail = @"default.BITMetaUserEmail"; 12 | 13 | NSString *const kBITFeedbackAttachmentLoadedNotification = @"BITFeedbackAttachmentLoadedNotification"; 14 | NSString *const kBITFeedbackAttachmentLoadedKey = @"attachment"; 15 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITApplication.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | 3 | @interface BITApplication : BITTelemetryObject 4 | 5 | @property (nonatomic, copy) NSString *version; 6 | @property (nonatomic, copy) NSString *build; 7 | @property (nonatomic, copy) NSString *typeId; 8 | 9 | - (instancetype)initWithCoder:(NSCoder *)coder; 10 | - (void)encodeWithCoder:(NSCoder *)coder; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITApplication.m: -------------------------------------------------------------------------------- 1 | #import "BITApplication.h" 2 | 3 | /// Data contract class for type Application. 4 | @implementation BITApplication 5 | 6 | /// Adds all members of this class to a dictionary. 7 | - (NSDictionary *)serializeToDictionary { 8 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 9 | if (self.version != nil) { 10 | [dict setObject:self.version forKey:@"ai.application.ver"]; 11 | } 12 | if (self.build != nil) { 13 | [dict setObject:self.build forKey:@"ai.application.build"]; 14 | } 15 | if (self.typeId != nil) { 16 | [dict setObject:self.typeId forKey:@"ai.application.typeId"]; 17 | } 18 | return dict; 19 | } 20 | 21 | #pragma mark - NSCoding 22 | 23 | - (instancetype)initWithCoder:(NSCoder *)coder { 24 | self = [super initWithCoder:coder]; 25 | if (self) { 26 | _version = [coder decodeObjectForKey:@"self.version"]; 27 | _build = [coder decodeObjectForKey:@"self.build"]; 28 | _typeId = [coder decodeObjectForKey:@"self.typeId"]; 29 | } 30 | 31 | return self; 32 | } 33 | 34 | - (void)encodeWithCoder:(NSCoder *)coder { 35 | [super encodeWithCoder:coder]; 36 | [coder encodeObject:self.version forKey:@"self.version"]; 37 | [coder encodeObject:self.build forKey:@"self.build"]; 38 | [coder encodeObject:self.typeId forKey:@"self.typeId"]; 39 | } 40 | 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITBase.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | #import "BITTelemetryData.h" 3 | 4 | @interface BITBase : BITTelemetryData 5 | 6 | @property (nonatomic, copy) NSString *baseType; 7 | 8 | - (instancetype)initWithCoder:(NSCoder *)coder; 9 | 10 | - (void)encodeWithCoder:(NSCoder *)coder; 11 | 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITBase.m: -------------------------------------------------------------------------------- 1 | #import "BITBase.h" 2 | 3 | /// Data contract class for type Base. 4 | @implementation BITBase 5 | 6 | /// Adds all members of this class to a dictionary. 7 | - (NSDictionary *)serializeToDictionary { 8 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 9 | if (self.baseType != nil) { 10 | [dict setObject:self.baseType forKey:@"baseType"]; 11 | } 12 | return dict; 13 | } 14 | 15 | #pragma mark - NSCoding 16 | 17 | - (instancetype)initWithCoder:(NSCoder *)coder { 18 | self = [super initWithCoder:coder]; 19 | if(self) { 20 | _baseType = [coder decodeObjectForKey:@"self.baseType"]; 21 | } 22 | 23 | return self; 24 | } 25 | 26 | - (void)encodeWithCoder:(NSCoder *)coder { 27 | [super encodeWithCoder:coder]; 28 | [coder encodeObject:self.baseType forKey:@"self.baseType"]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITCategoryContainer.h: -------------------------------------------------------------------------------- 1 | #import "HockeySDKPrivate.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | @interface BITCategoryContainer : NSObject 5 | 6 | + (void)activateCategory; 7 | 8 | @end 9 | 10 | NS_ASSUME_NONNULL_END 11 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITChannel.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HockeySDKNullability.h" 3 | 4 | @class BITConfiguration; 5 | @class BITTelemetryData; 6 | @class BITTelemetryContext; 7 | @class BITPersistence; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /** 12 | * Buffer of telemtry events, will be written to disk. Make sure the buffer is used in a threadsafe way. 13 | */ 14 | FOUNDATION_EXPORT char *_Nullable BITTelemetryEventBuffer; 15 | 16 | /** 17 | * Items get queued before they are persisted and sent out as a batch. This class managed the queue, and forwards the batch 18 | * to the persistence layer once the max batch count has been reached. 19 | */ 20 | @interface BITChannel : NSObject 21 | 22 | 23 | /** 24 | * Initializes a new BITChannel instance. 25 | * 26 | * @param telemetryContext the context used to add context values to the metrics payload 27 | * @param persistence the persistence used to save metrics after the queue gets flushed 28 | * 29 | * @return the telemetry context 30 | */ 31 | - (instancetype)initWithTelemetryContext:(BITTelemetryContext *)telemetryContext persistence:(BITPersistence *) persistence; 32 | 33 | /** 34 | * Reset BITSafeJsonEventsString so we can start appending JSON dictionaries. 35 | * 36 | * @param item The telemetry object, which should be processed 37 | */ 38 | - (void)enqueueTelemetryItem:(BITTelemetryData *)item; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITChannelPrivate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class BITTelemetryData; 4 | @class BITTelemetryContext; 5 | @class BITPersistence; 6 | 7 | #import "BITChannel.h" 8 | 9 | #import "HockeySDKNullability.h" 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface BITChannel () 13 | 14 | /** 15 | * Notification that will be send on the main thread to notifiy observers that channel can't enqueue new items. 16 | * This is typically used to trigger sending to the server. 17 | */ 18 | FOUNDATION_EXPORT NSString *const BITChannelBlockedNotification; 19 | 20 | /** 21 | * Telemetry context used by the channel to create the payload (testing). 22 | */ 23 | @property (nonatomic, strong) BITTelemetryContext *telemetryContext; 24 | 25 | /** 26 | * Persistence instance for storing files after the queue gets flushed (testing). 27 | */ 28 | @property (nonatomic, strong) BITPersistence *persistence; 29 | 30 | /* 31 | * Threshold for sending data to the server. Default batch size for debugging is 150, for release 32 | * configuration, the batch size is 5. 33 | * 34 | * Default: 50 35 | * 36 | * @warning: We advice to not set the batch size below 5 events. 37 | */ 38 | @property (nonatomic) NSUInteger maxBatchSize; 39 | 40 | /* 41 | * Interval for sending data to the server in seconds. 42 | * 43 | * Default: 15 44 | */ 45 | @property (nonatomic, assign) NSInteger batchInterval; 46 | 47 | /** 48 | * A timer source which is used to flush the queue after a cretain time. 49 | */ 50 | @property (nonatomic, strong, nullable) dispatch_source_t timerSource; 51 | 52 | /** 53 | * A queue which makes array operations thread safe. 54 | */ 55 | @property (nonatomic, strong) dispatch_queue_t dataItemsOperations; 56 | 57 | /** 58 | * An integer value that keeps tracks of the number of data items added to the JSON Stream string. 59 | */ 60 | @property (nonatomic, assign) NSUInteger dataItemCount; 61 | 62 | /** 63 | * Indicates that channel is currently in a blocked state. 64 | */ 65 | @property BOOL channelBlocked; 66 | 67 | /** 68 | * Manually trigger the BITChannel to persist all items currently in its data item queue. 69 | */ 70 | - (void)persistDataItemQueue:(char *_Nullable*_Nullable)eventBuffer; 71 | 72 | /** 73 | * Adds the specified dictionary to the JSON Stream string. 74 | * 75 | * @param dictionary the dictionary object which is to be added to the JSON Stream queue string. 76 | */ 77 | - (void)appendDictionaryToEventBuffer:(NSDictionary *)dictionary; 78 | 79 | /** 80 | * A C function that serializes a given dictionary to JSON and appends it to a char string 81 | * 82 | * @param string The C string which the dictionary's JSON representation will be appended to. 83 | */ 84 | void bit_appendStringToEventBuffer(NSString *string, char *__nonnull*__nonnull eventBuffer); 85 | 86 | /** 87 | * Reset the event buffer so we can start appending JSON dictionaries. 88 | * 89 | * @param eventBuffer The string that will be reset. 90 | */ 91 | void bit_resetEventBuffer(char *__nonnull*__nonnull eventBuffer); 92 | 93 | /** 94 | * A method which indicates whether the telemetry pipeline is busy and no new data should be enqueued. 95 | * Currently, we drop telemetry data if this returns YES. 96 | * This depends on defaultMaxBatchCount and defaultBatchInterval. 97 | * 98 | * @return Returns yes if currently no new data should be enqueued on the channel. 99 | */ 100 | - (BOOL)isQueueBusy; 101 | 102 | @end 103 | 104 | NS_ASSUME_NONNULL_END 105 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITData.h: -------------------------------------------------------------------------------- 1 | #import "BITBase.h" 2 | @class BITTelemetryData; 3 | 4 | @interface BITData : BITBase 5 | 6 | @property (nonatomic, strong) BITTelemetryData *baseData; 7 | 8 | - (instancetype)initWithCoder:(NSCoder *)coder; 9 | 10 | - (void)encodeWithCoder:(NSCoder *)coder; 11 | 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITData.m: -------------------------------------------------------------------------------- 1 | #import "BITData.h" 2 | 3 | /// Data contract class for type Data. 4 | @implementation BITData 5 | 6 | /// Adds all members of this class to a dictionary. 7 | - (NSDictionary *)serializeToDictionary { 8 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 9 | NSDictionary *baseDataDict = [self.baseData serializeToDictionary]; 10 | if ([NSJSONSerialization isValidJSONObject:baseDataDict]) { 11 | [dict setObject:baseDataDict forKey:@"baseData"]; 12 | } else { 13 | NSLog(@"[HockeyApp] Some of the telemetry data was not NSJSONSerialization compatible and could not be serialized!"); 14 | } 15 | return dict; 16 | } 17 | 18 | #pragma mark - NSCoding 19 | 20 | - (instancetype)initWithCoder:(NSCoder *)coder { 21 | self = [super initWithCoder:coder]; 22 | if(self) { 23 | _baseData = [coder decodeObjectForKey:@"self.baseData"]; 24 | } 25 | 26 | return self; 27 | } 28 | 29 | - (void)encodeWithCoder:(NSCoder *)coder { 30 | [super encodeWithCoder:coder]; 31 | [coder encodeObject:self.baseData forKey:@"self.baseData"]; 32 | } 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITDevice.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | 3 | @interface BITDevice : BITTelemetryObject 4 | 5 | @property (nonatomic, copy) NSString *deviceId; 6 | @property (nonatomic, copy) NSString *ip; 7 | @property (nonatomic, copy) NSString *language; 8 | @property (nonatomic, copy) NSString *locale; 9 | @property (nonatomic, copy) NSString *machineName; 10 | @property (nonatomic, copy) NSString *model; 11 | @property (nonatomic, copy) NSString *network; 12 | @property (nonatomic, copy) NSString *networkName; 13 | @property (nonatomic, copy) NSString *oemName; 14 | @property (nonatomic, copy) NSString *os; 15 | @property (nonatomic, copy) NSString *osVersion; 16 | @property (nonatomic, copy) NSString *roleInstance; 17 | @property (nonatomic, copy) NSString *roleName; 18 | @property (nonatomic, copy) NSString *screenResolution; 19 | @property (nonatomic, copy) NSString *type; 20 | @property (nonatomic, copy) NSString *vmName; 21 | 22 | - (instancetype)initWithCoder:(NSCoder *)coder; 23 | 24 | - (void)encodeWithCoder:(NSCoder *)coder; 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITDomain.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryData.h" 2 | 3 | @interface BITDomain : BITTelemetryData 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITDomain.m: -------------------------------------------------------------------------------- 1 | #import "BITDomain.h" 2 | /// Data contract class for type Domain. 3 | @implementation BITDomain 4 | @synthesize envelopeTypeName = _envelopeTypeName; 5 | @synthesize dataTypeName = _dataTypeName; 6 | 7 | /// Initializes a new instance of the class. 8 | - (instancetype)init { 9 | if ((self = [super init])) { 10 | _envelopeTypeName = @"Microsoft.ApplicationInsights.Domain"; 11 | _dataTypeName = @"Domain"; 12 | } 13 | return self; 14 | } 15 | 16 | /// Adds all members of this class to a dictionary. 17 | - (NSDictionary *)serializeToDictionary { 18 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 19 | return dict; 20 | } 21 | 22 | #pragma mark - NSCoding 23 | 24 | - (instancetype)initWithCoder:(NSCoder *)coder { 25 | self = [super initWithCoder:coder]; 26 | if (self) { 27 | _envelopeTypeName = [coder decodeObjectForKey:@"_envelopeTypeName"] ?: @""; 28 | _dataTypeName = [coder decodeObjectForKey:@"_dataTypeName"] ?: @""; 29 | } 30 | 31 | return self; 32 | } 33 | 34 | - (void)encodeWithCoder:(NSCoder *)coder { 35 | [super encodeWithCoder:coder]; 36 | [coder encodeObject:self.envelopeTypeName forKey:@"_envelopeTypeName"]; 37 | [coder encodeObject:self.dataTypeName forKey:@"_dataTypeName"]; 38 | } 39 | 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITEnvelope.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | @class BITBase; 3 | 4 | @interface BITEnvelope : BITTelemetryObject 5 | 6 | @property (nonatomic, copy) NSNumber *version; 7 | @property (nonatomic, copy) NSString *name; 8 | @property (nonatomic, copy) NSString *time; 9 | @property (nonatomic, copy) NSNumber *sampleRate; 10 | @property (nonatomic, copy) NSString *seq; 11 | @property (nonatomic, copy) NSString *iKey; 12 | @property (nonatomic, copy) NSNumber *flags; 13 | @property (nonatomic, copy) NSString *deviceId; 14 | @property (nonatomic, copy) NSString *os; 15 | @property (nonatomic, copy) NSString *osVer; 16 | @property (nonatomic, copy) NSString *appId; 17 | @property (nonatomic, copy) NSString *appVer; 18 | @property (nonatomic, copy) NSString *userId; 19 | @property (nonatomic, strong) NSDictionary *tags; 20 | @property (nonatomic, strong) BITBase *data; 21 | 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITEventData.h: -------------------------------------------------------------------------------- 1 | #import "BITDomain.h" 2 | 3 | @interface BITEventData : BITDomain 4 | 5 | @property (nonatomic, copy, readonly) NSString *envelopeTypeName; 6 | @property (nonatomic, copy, readonly) NSString *dataTypeName; 7 | @property (nonatomic, strong) NSDictionary *measurements; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITEventData.m: -------------------------------------------------------------------------------- 1 | #import "BITEventData.h" 2 | 3 | /// Data contract class for type EventData. 4 | @implementation BITEventData 5 | @synthesize envelopeTypeName = _envelopeTypeName; 6 | @synthesize dataTypeName = _dataTypeName; 7 | @synthesize version = _version; 8 | @synthesize properties = _properties; 9 | @synthesize measurements = _measurements; 10 | 11 | /// Initializes a new instance of the class. 12 | - (instancetype)init { 13 | if ((self = [super init])) { 14 | _envelopeTypeName = @"Microsoft.ApplicationInsights.Event"; 15 | _dataTypeName = @"EventData"; 16 | _version = @2; 17 | _properties = [NSDictionary new]; 18 | _measurements = [NSDictionary new]; 19 | } 20 | return self; 21 | } 22 | 23 | /// Adds all members of this class to a dictionary. 24 | - (NSDictionary *)serializeToDictionary { 25 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 26 | if (self.name != nil) { 27 | [dict setObject:self.name forKey:@"name"]; 28 | } 29 | if (self.properties != nil) { 30 | [dict setObject:(NSDictionary *)self.properties forKey:@"properties"]; 31 | } 32 | if (self.measurements) { 33 | [dict setObject:self.measurements forKey:@"measurements"]; 34 | } 35 | 36 | return dict; 37 | } 38 | 39 | #pragma mark - NSCoding 40 | 41 | - (instancetype)initWithCoder:(NSCoder *)coder { 42 | self = [super initWithCoder:coder]; 43 | if(self) { 44 | _envelopeTypeName = [coder decodeObjectForKey:@"self.envelopeTypeName"]; 45 | _dataTypeName = [coder decodeObjectForKey:@"self.dataTypeName"]; 46 | _version = [coder decodeObjectForKey:@"self.version"] ?: @""; 47 | _properties = [coder decodeObjectForKey:@"self.properties"]; 48 | _measurements = [coder decodeObjectForKey:@"self.measurements"]; 49 | } 50 | return self; 51 | } 52 | 53 | - (void)encodeWithCoder:(NSCoder *)coder { 54 | [super encodeWithCoder:coder]; 55 | [coder encodeObject:self.envelopeTypeName forKey:@"self.envelopeTypeName"]; 56 | [coder encodeObject:self.dataTypeName forKey:@"self.dataTypeName"]; 57 | [coder encodeObject:self.version forKey:@"self.version"]; 58 | [coder encodeObject:self.properties forKey:@"self.properties"]; 59 | [coder encodeObject:self.measurements forKey:@"self.measurements"]; 60 | } 61 | 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITGZIP.h: -------------------------------------------------------------------------------- 1 | // 2 | // GZIP.h 3 | // 4 | // Version 1.0.3 5 | // 6 | // Created by Nick Lockwood on 03/06/2012. 7 | // Copyright (C) 2012 Charcoal Design 8 | // 9 | // Distributed under the permissive zlib License 10 | // Get the latest version from here: 11 | // 12 | // https://github.com/nicklockwood/GZIP 13 | // 14 | // This software is provided 'as-is', without any express or implied 15 | // warranty. In no event will the authors be held liable for any damages 16 | // arising from the use of this software. 17 | // 18 | // Permission is granted to anyone to use this software for any purpose, 19 | // including commercial applications, and to alter it and redistribute it 20 | // freely, subject to the following restrictions: 21 | // 22 | // 1. The origin of this software must not be misrepresented; you must not 23 | // claim that you wrote the original software. If you use this software 24 | // in a product, an acknowledgment in the product documentation would be 25 | // appreciated but is not required. 26 | // 27 | // 2. Altered source versions must be plainly marked as such, and must not be 28 | // misrepresented as being the original software. 29 | // 30 | // 3. This notice may not be removed or altered from any source distribution. 31 | // 32 | 33 | 34 | #import 35 | 36 | @interface NSData (GZIP) 37 | 38 | - (NSData *)bit_gzippedDataWithCompressionLevel:(float)level; 39 | - (NSData *)bit_gzippedData; 40 | - (NSData *)bit_gunzippedData; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITInternal.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | 3 | @interface BITInternal : BITTelemetryObject 4 | 5 | @property (nonatomic, copy) NSString *sdkVersion; 6 | @property (nonatomic, copy) NSString *agentVersion; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITInternal.m: -------------------------------------------------------------------------------- 1 | #import "BITInternal.h" 2 | 3 | /// Data contract class for type Internal. 4 | @implementation BITInternal 5 | 6 | /// Adds all members of this class to a dictionary. 7 | - (NSDictionary *)serializeToDictionary { 8 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 9 | if (self.sdkVersion != nil) { 10 | [dict setObject:self.sdkVersion forKey:@"ai.internal.sdkVersion"]; 11 | } 12 | if (self.agentVersion != nil) { 13 | [dict setObject:self.agentVersion forKey:@"ai.internal.agentVersion"]; 14 | } 15 | return dict; 16 | } 17 | 18 | #pragma mark - NSCoding 19 | 20 | - (instancetype)initWithCoder:(NSCoder *)coder { 21 | self = [super init]; 22 | if(self) { 23 | _sdkVersion = [coder decodeObjectForKey:@"self.sdkVersion"]; 24 | _agentVersion = [coder decodeObjectForKey:@"self.agentVersion"]; 25 | } 26 | 27 | return self; 28 | } 29 | 30 | - (void)encodeWithCoder:(NSCoder *)coder { 31 | [coder encodeObject:self.sdkVersion forKey:@"self.sdkVersion"]; 32 | [coder encodeObject:self.agentVersion forKey:@"self.agentVersion"]; 33 | } 34 | 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITMetricsManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "BITHockeyBaseManager.h" 3 | #import "HockeySDKNullability.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | /** 8 | The metrics module. 9 | 10 | This is the HockeySDK module that handles users, sessions and events tracking. 11 | 12 | Unless disabled, this module automatically tracks users and session of your app to give you 13 | better insights about how your app is being used. 14 | Users are tracked in a completely anonymous way without collecting any personally identifiable 15 | information. 16 | 17 | Before starting to track events, ask yourself the questions that you want to get answers to. 18 | For instance, you might be interested in business, performance/quality or user experience aspects. 19 | Name your events in a meaningful way and keep in mind that you will use these names 20 | when searching for events in the HockeyApp web portal. 21 | 22 | It is your reponsibility to not collect personal information as part of the events tracking or get 23 | prior consent from your users as necessary. 24 | */ 25 | @interface BITMetricsManager : BITHockeyBaseManager 26 | 27 | /** 28 | * A property indicating whether the BITMetricsManager instance is disabled. 29 | */ 30 | @property (nonatomic, assign) BOOL disabled; 31 | 32 | /** 33 | * This method allows to track an event that happened in your app. 34 | * Remember to choose meaningful event names to have the best experience when diagnosing your app 35 | * in the HockeyApp web portal. 36 | * 37 | * @param eventName The event's name as a string. 38 | */ 39 | - (void)trackEventWithName:(nonnull NSString *)eventName; 40 | 41 | /** 42 | * This method allows to track an event that happened in your app. 43 | * Remember to choose meaningful event names to have the best experience when diagnosing your app 44 | * in the web portal. 45 | * 46 | * @param eventName the name of the event, which should be tracked. 47 | * @param properties key value pairs with additional info about the event. 48 | * @param measurements key value pairs, which contain custom metrics. 49 | */ 50 | - (void)trackEventWithName:(nonnull NSString *)eventName properties:(nullable NSDictionary *)properties measurements:(nullable NSDictionary *)measurements; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITPersistence.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | * A simple class that handles serialisation and deserialisation of bundles of data. 5 | */ 6 | @interface BITPersistence : NSObject 7 | 8 | @end 9 | 10 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITSession.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | 3 | @interface BITSession : BITTelemetryObject 4 | 5 | @property (nonatomic, copy) NSString *sessionId; 6 | @property (nonatomic, copy) NSString *isFirst; 7 | @property (nonatomic, copy) NSString *isNew; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITSession.m: -------------------------------------------------------------------------------- 1 | #import "BITSession.h" 2 | 3 | /// Data contract class for type Session. 4 | @implementation BITSession 5 | 6 | /// Adds all members of this class to a dictionary. 7 | - (NSDictionary *)serializeToDictionary { 8 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 9 | if (self.sessionId != nil) { 10 | [dict setObject:self.sessionId forKey:@"ai.session.id"]; 11 | } 12 | if (self.isFirst != nil) { 13 | [dict setObject:self.isFirst forKey:@"ai.session.isFirst"]; 14 | } 15 | if (self.isNew != nil) { 16 | [dict setObject:self.isNew forKey:@"ai.session.isNew"]; 17 | } 18 | return dict; 19 | } 20 | 21 | #pragma mark - NSCoding 22 | 23 | - (instancetype)initWithCoder:(NSCoder *)coder { 24 | self = [super initWithCoder:coder]; 25 | if(self) { 26 | _sessionId = [coder decodeObjectForKey:@"self.sessionId"]; 27 | _isFirst = [coder decodeObjectForKey:@"self.isFirst"]; 28 | _isNew = [coder decodeObjectForKey:@"self.isNew"]; 29 | } 30 | 31 | return self; 32 | } 33 | 34 | - (void)encodeWithCoder:(NSCoder *)coder { 35 | [super encodeWithCoder:coder]; 36 | [coder encodeObject:self.sessionId forKey:@"self.sessionId"]; 37 | [coder encodeObject:self.isFirst forKey:@"self.isFirst"]; 38 | [coder encodeObject:self.isNew forKey:@"self.isNew"]; 39 | } 40 | 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITSessionState.h: -------------------------------------------------------------------------------- 1 | #import 2 | /// Enum class for type SessionState. 3 | typedef NS_ENUM(NSInteger, BITSessionState) { 4 | BITSessionState_start = 0, 5 | 6 | BITSessionState_end = 1, 7 | 8 | }; 9 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITSessionStateData.h: -------------------------------------------------------------------------------- 1 | #import "BITDomain.h" 2 | #import "BITSessionState.h" 3 | 4 | @interface BITSessionStateData : BITDomain 5 | 6 | @property (nonatomic, copy, readonly) NSString *envelopeTypeName; 7 | @property (nonatomic, copy, readonly) NSString *dataTypeName; 8 | @property (nonatomic, assign) BITSessionState state; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITSessionStateData.m: -------------------------------------------------------------------------------- 1 | #import "BITSessionStateData.h" 2 | 3 | /// Data contract class for type SessionStateData. 4 | @implementation BITSessionStateData 5 | @synthesize envelopeTypeName = _envelopeTypeName; 6 | @synthesize dataTypeName = _dataTypeName; 7 | @synthesize version = _version; 8 | 9 | /// Initializes a new instance of the class. 10 | - (instancetype)init { 11 | if((self = [super init])) { 12 | _envelopeTypeName = @"Microsoft.ApplicationInsights.SessionState"; 13 | _dataTypeName = @"SessionStateData"; 14 | _version = @2; 15 | _state = BITSessionState_start; 16 | } 17 | return self; 18 | } 19 | 20 | /// Adds all members of this class to a dictionary. 21 | - (NSDictionary *)serializeToDictionary { 22 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 23 | [dict setObject:[NSNumber numberWithInt:(int)self.state] forKey:@"state"]; 24 | return dict; 25 | } 26 | 27 | #pragma mark - NSCoding 28 | 29 | - (instancetype)initWithCoder:(NSCoder *)coder { 30 | self = [super initWithCoder:coder]; 31 | if(self) { 32 | _envelopeTypeName =[coder decodeObjectForKey:@"envelopeTypeName"]; 33 | _dataTypeName = [coder decodeObjectForKey:@"dataTypeName"]; 34 | _state = (BITSessionState)[coder decodeIntForKey:@"self.state"]; 35 | } 36 | return self; 37 | } 38 | 39 | - (void)encodeWithCoder:(NSCoder *)coder { 40 | [super encodeWithCoder:coder]; 41 | [coder encodeObject:self.envelopeTypeName forKey:@"envelopeTypeName"]; 42 | [coder encodeObject:self.dataTypeName forKey:@"dataTypeName"]; 43 | [coder encodeInt:self.state forKey:@"self.state"]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITTelemetryContext.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "HockeySDKPrivate.h" 3 | #import "BITApplication.h" 4 | #import "BITDevice.h" 5 | #import "BITInternal.h" 6 | #import "BITUser.h" 7 | #import "BITSession.h" 8 | 9 | @class BITPersistence; 10 | 11 | #import "HockeySDKNullability.h" 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | * Context object which contains information about the device, user, session etc. 16 | */ 17 | @interface BITTelemetryContext : NSObject 18 | 19 | ///----------------------------------------------------------------------------- 20 | /// @name Initialisation 21 | ///----------------------------------------------------------------------------- 22 | 23 | /** 24 | * The persistence instance used to save/load metadata. 25 | */ 26 | @property(nonatomic, strong) BITPersistence *persistence; 27 | 28 | /** 29 | * The instrumentation key of the app. 30 | */ 31 | @property(nonatomic, copy) NSString *appIdentifier; 32 | 33 | /** 34 | * A queue which makes array operations thread safe. 35 | */ 36 | @property (nonatomic, strong) dispatch_queue_t operationsQueue; 37 | 38 | /** 39 | * The application context. 40 | */ 41 | @property(nonatomic, strong, readonly) BITApplication *application; 42 | 43 | /** 44 | * The device context. 45 | */ 46 | @property (nonatomic, strong, readonly)BITDevice *device; 47 | 48 | /** 49 | * The session context. 50 | */ 51 | @property (nonatomic, strong, readonly)BITSession *session; 52 | 53 | /** 54 | * The user context. 55 | */ 56 | @property (nonatomic, strong, readonly)BITUser *user; 57 | 58 | /** 59 | * The internal context. 60 | */ 61 | @property (nonatomic, strong, readonly)BITInternal *internal; 62 | 63 | /** 64 | * Initializes a telemetry context. 65 | * 66 | * @param appIdentifier the appIdentifier of the app 67 | * @param persistence the persistence used to save and load metadata 68 | * 69 | * @return the telemetry context 70 | */ 71 | - (instancetype)initWithAppIdentifier:(NSString *)appIdentifier persistence:(BITPersistence *)persistence; 72 | 73 | ///----------------------------------------------------------------------------- 74 | /// @name Helper 75 | ///----------------------------------------------------------------------------- 76 | 77 | /** 78 | * A dictionary which holds static tag fields for the purpose of caching 79 | */ 80 | @property (nonatomic, strong) NSDictionary *tags; 81 | 82 | /** 83 | * Returns context objects as dictionary. 84 | * 85 | * @return a dictionary containing all context fields 86 | */ 87 | - (NSDictionary *)contextDictionary; 88 | 89 | ///----------------------------------------------------------------------------- 90 | /// @name Getter/Setter 91 | ///----------------------------------------------------------------------------- 92 | 93 | - (void)setSessionId:(NSString *)sessionId; 94 | 95 | - (void)setIsFirstSession:(NSString *)isFirstSession; 96 | 97 | - (void)setIsNewSession:(NSString *)isNewSession; 98 | 99 | @end 100 | 101 | NS_ASSUME_NONNULL_END 102 | 103 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITTelemetryData.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | 3 | #import "HockeySDKNullability.h" 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | ///Data contract class for type BITTelemetryData. 7 | @interface BITTelemetryData : BITTelemetryObject 8 | 9 | @property (nonatomic, readonly, copy) NSString *envelopeTypeName; 10 | @property (nonatomic, readonly, copy) NSString *dataTypeName; 11 | 12 | @property (nonatomic, copy) NSNumber *version; 13 | @property (nonatomic, copy) NSString *name; 14 | @property (nonatomic, nullable, strong) NSDictionary *properties; 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITTelemetryData.m: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryData.h" 2 | 3 | @implementation BITTelemetryData 4 | 5 | - (NSDictionary *)serializeToDictionary { 6 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 7 | if (self.version != nil) { 8 | [dict setObject:self.version forKey:@"ver"]; 9 | } 10 | 11 | return dict; 12 | } 13 | 14 | #pragma mark - NSCoding 15 | 16 | - (instancetype)initWithCoder:(NSCoder *)coder { 17 | self = [super initWithCoder:coder]; 18 | if(self) { 19 | _version = [coder decodeObjectForKey:@"self.version"] ?: @""; 20 | _name = [coder decodeObjectForKey:@"self.name"] ?: @""; 21 | _properties = [coder decodeObjectForKey:@"self.properties"] ?: @""; 22 | } 23 | return self; 24 | } 25 | 26 | - (void)encodeWithCoder:(NSCoder *)coder { 27 | [super encodeWithCoder:coder]; 28 | [coder encodeObject:self.version forKey:@"self.version"]; 29 | [coder encodeObject:self.name forKey:@"self.name"]; 30 | [coder encodeObject:self.properties forKey:@"self.properties"]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITTelemetryObject.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface BITTelemetryObject : NSObject 5 | 6 | - (NSDictionary *)serializeToDictionary; 7 | - (NSString *)serializeToString; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITTelemetryObject.m: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | 3 | @implementation BITTelemetryObject 4 | 5 | // empty implementation for the base class 6 | - (NSDictionary *)serializeToDictionary{ 7 | return [NSDictionary dictionary]; 8 | } 9 | 10 | - (NSString *)serializeToString { 11 | NSDictionary *dict = [self serializeToDictionary]; 12 | NSMutableString *jsonString; 13 | NSError *error = nil; 14 | NSData *json; 15 | json = [NSJSONSerialization dataWithJSONObject:dict options:0 error:&error]; 16 | jsonString = [[NSMutableString alloc] initWithData:json encoding:NSUTF8StringEncoding]; 17 | NSString *returnString = [[jsonString stringByReplacingOccurrencesOfString:@"\"true\"" withString:@"true"] stringByReplacingOccurrencesOfString:@"\"false\"" withString:@"false"]; 18 | return returnString; 19 | } 20 | 21 | - (void)encodeWithCoder:(NSCoder *) __unused coder { 22 | } 23 | 24 | - (instancetype)initWithCoder:(NSCoder *) __unused coder { 25 | return [super init]; 26 | } 27 | 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITUser.h: -------------------------------------------------------------------------------- 1 | #import "BITTelemetryObject.h" 2 | 3 | @interface BITUser : BITTelemetryObject 4 | 5 | @property (nonatomic, copy) NSString *accountAcquisitionDate; 6 | @property (nonatomic, copy) NSString *accountId; 7 | @property (nonatomic, copy) NSString *userAgent; 8 | @property (nonatomic, copy) NSString *userId; 9 | @property (nonatomic, copy) NSString *storeRegion; 10 | @property (nonatomic, copy) NSString *authUserId; 11 | @property (nonatomic, copy) NSString *anonUserAcquisitionDate; 12 | @property (nonatomic, copy) NSString *authUserAcquisitionDate; 13 | 14 | - (BOOL)isEqualToUser:(BITUser *)aUser; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Classes/Telemetry/BITUser.m: -------------------------------------------------------------------------------- 1 | #import "BITUser.h" 2 | 3 | /// Data contract class for type User. 4 | @implementation BITUser 5 | 6 | /// Adds all members of this class to a dictionary. 7 | - (NSDictionary *)serializeToDictionary { 8 | NSMutableDictionary *dict = [super serializeToDictionary].mutableCopy; 9 | if (self.accountAcquisitionDate != nil) { 10 | [dict setObject:self.accountAcquisitionDate forKey:@"ai.user.accountAcquisitionDate"]; 11 | } 12 | if (self.accountId != nil) { 13 | [dict setObject:self.accountId forKey:@"ai.user.accountId"]; 14 | } 15 | if (self.userAgent != nil) { 16 | [dict setObject:self.userAgent forKey:@"ai.user.userAgent"]; 17 | } 18 | if (self.userId != nil) { 19 | [dict setObject:self.userId forKey:@"ai.user.id"]; 20 | } 21 | if(self.storeRegion != nil) { 22 | [dict setObject:self.storeRegion forKey:@"ai.user.storeRegion"]; 23 | } 24 | if(self.authUserId != nil) { 25 | [dict setObject:self.authUserId forKey:@"ai.user.authUserId"]; 26 | } 27 | if(self.anonUserAcquisitionDate != nil) { 28 | [dict setObject:self.anonUserAcquisitionDate forKey:@"ai.user.anonUserAcquisitionDate"]; 29 | } 30 | if(self.authUserAcquisitionDate != nil) { 31 | [dict setObject:self.authUserAcquisitionDate forKey:@"ai.user.authUserAcquisitionDate"]; 32 | } 33 | return dict; 34 | } 35 | 36 | #pragma mark - NSCoding 37 | 38 | - (instancetype)initWithCoder:(NSCoder *)coder { 39 | self = [super initWithCoder:coder]; 40 | if(self) { 41 | _accountAcquisitionDate = [coder decodeObjectForKey:@"self.accountAcquisitionDate"]; 42 | _accountId = [coder decodeObjectForKey:@"self.accountId"]; 43 | _userAgent = [coder decodeObjectForKey:@"self.userAgent"]; 44 | _userId = [coder decodeObjectForKey:@"self.userId"]; 45 | _storeRegion = [coder decodeObjectForKey:@"self.storeRegion"]; 46 | _authUserId = [coder decodeObjectForKey:@"self.authUserId"]; 47 | _anonUserAcquisitionDate = [coder decodeObjectForKey:@"self.anonUserAcquisitionDate"]; 48 | _authUserAcquisitionDate = [coder decodeObjectForKey:@"self.authUserAcquisitionDate"]; 49 | } 50 | 51 | return self; 52 | } 53 | 54 | - (void)encodeWithCoder:(NSCoder *)coder { 55 | [super encodeWithCoder:coder]; 56 | [coder encodeObject:self.accountAcquisitionDate forKey:@"self.accountAcquisitionDate"]; 57 | [coder encodeObject:self.accountId forKey:@"self.accountId"]; 58 | [coder encodeObject:self.userAgent forKey:@"self.userAgent"]; 59 | [coder encodeObject:self.userId forKey:@"self.userId"]; 60 | [coder encodeObject:self.storeRegion forKey:@"self.storeRegion"]; 61 | [coder encodeObject:self.authUserId forKey:@"self.authUserId"]; 62 | [coder encodeObject:self.anonUserAcquisitionDate forKey:@"self.anonUserAcquisitionDate"]; 63 | [coder encodeObject:self.authUserAcquisitionDate forKey:@"self.authUserAcquisitionDate"]; 64 | } 65 | 66 | #pragma mark - Compare 67 | 68 | - (BOOL)isEqualToUser:(BITUser *)aUser { 69 | if (aUser == self) { 70 | return YES; 71 | } 72 | if (!aUser || ![aUser isKindOfClass:[self class]]) { 73 | return NO; 74 | } 75 | if (![self.userId isEqualToString: aUser.userId]) { 76 | return NO; 77 | } 78 | if(![self.authUserId isEqualToString: aUser.authUserId]) { 79 | return NO; 80 | } 81 | if (![self.accountId isEqualToString: aUser.accountId]) { 82 | return NO; 83 | } 84 | if(![self.anonUserAcquisitionDate isEqualToString: aUser.anonUserAcquisitionDate]) { 85 | return NO; 86 | } 87 | if(![self.authUserAcquisitionDate isEqualToString: aUser.authUserAcquisitionDate]) { 88 | return NO; 89 | } 90 | if (![self.accountAcquisitionDate isEqualToString: aUser.accountAcquisitionDate]) { 91 | return NO; 92 | } 93 | if (![self.userAgent isEqualToString: aUser.userAgent]) { 94 | return NO; 95 | } 96 | if(![self.storeRegion isEqualToString: aUser.storeRegion]) { 97 | return NO; 98 | } 99 | 100 | return YES; 101 | } 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /Documentation/Guides/App Versioning.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | 3 | We suggest to handle beta and release versions in two separate *apps* on HockeyApp with their own bundle identifier (e.g. by adding "beta" to the bundle identifier), so 4 | 5 | * both apps can run on the same device or computer at the same time without interfering, 6 | * release versions do not appear on the beta download pages, and 7 | * easier analysis of crash reports and user feedback. 8 | 9 | We propose the following method to set version numbers in your beta versions: 10 | 11 | * Use both `Bundle Version` and `Bundle Version String, short` in your Info.plist. 12 | * "Bundle Version" should contain a sequential build number, e.g. 1, 2, 3. 13 | * "Bundle Version String, short" should contain the target official version number, e.g. 1.0. 14 | 15 | ## HowTo 16 | 17 | The recommended way to do versioning of your app versions is as follows: 18 | 19 | - Each version gets an ongoing `build` number which increases by `1` for every version as `CFBundleVersion` in `Info.plist` 20 | - Additionally `CFBundleShortVersionString` in `Info.plist` will contain you target public version number as a string like `1.0.0` 21 | 22 | This ensures that each app version is uniquely identifiable, and that live and beta version numbers never ever collide. 23 | 24 | This is how to set it up with Xcode 4: 25 | 26 | 1. Pick `File | New`, choose `Other` and `Configuration Settings File`, this gets you a new .xcconfig file. 27 | 2. Name it `buildnumber.xcconfig` 28 | 3. Add one line with this content: `BUILD_NUMBER = 1` 29 | 4. Then click on the project on the upper left in the file browser (the same place where you get to build settings), click on the project again in the second-to-left panel, and click on the Info tab at the top of the inner panel. 30 | 5. There, you can choose `Based on Configuration File` for each of your targets for each of your configurations (debug, release, etc.) 31 | 6. Select your target 32 | 7. Select the `Summary` tab 33 | 8. For `Build` enter the value: `${BUILD_NUMBER}` 34 | 9. Select the `Build Phases` tab 35 | 10. Select `Add Build Phase` 36 | 11. Choose `Add Run Script` 37 | 12. Add the following content: 38 | 39 | if [ "$CONFIGURATION" == "AdHoc_Distribution" ] 40 | then /usr/bin/perl -pe 's/(BUILD_NUMBER = )(\d+)/$1.($2+1)/eg' -i buildnumber.xcconfig 41 | fi 42 | 13. Change `AdHoc_Distribution` to the actual name of the Xcode configuration(s) you wnat the build number to be increased. 43 | 44 | *Note:* Configuration names should not contain spaces! 45 | 14. If you want to increase the build number before the build actuallry starts, just drag it up -------------------------------------------------------------------------------- /Documentation/Guides/Crash Reporting Not Working.md: -------------------------------------------------------------------------------- 1 | ## Crash Reporting is not working 2 | 3 | This is a checklist to help find the issue if crashes do not appear in HockeyApp or the dialog asking if crashes should be send doesn't appear: 4 | 5 | 6 | 1. Check if the `APP_IDENTIFIER` matches the App ID in HockeyApp. 7 | 8 | 2. Check if `CFBundleIdentifier` in your `Info.plist` matches the Bundle Identifier of the app in HockeyApp. HockeyApp accepts crashes only if both the App ID and the Bundle Identifier equal their corresponding values in your plist and source code. 9 | 10 | 3. Unless you have enabled `[BITCrashManager setAutoSubmitCrashReport:]`: If your app crashes and you start it again, is the alert shown which asks the user to send the crash report? If not, please crash your app again, then connect the debugger and set a break point in `BITCrashManager`, method `startManager` to see why the alert is not shown. 11 | 12 | 4. Enable the debug logging option and check the output if the Crash Manager gets `Setup`, `Started`, returns no error message and sending the crash report to the server results in no error: 13 | 14 | [BITHockeyManager sharedHockeyManager].logLevel = BITLogLevelDebug; 15 | 16 | 17 | 5. Make sure Xcode debugger is not attached while causing the app to crash 18 | 19 | 6. If you are using `#ifdef (CONFIGURATION_something)`, make sure that the `something` string matches the exact name of your Xcode build configuration. Spaces are not allowed! 20 | 21 | 7. Remove or at least disable any other exception handler or crash reporting framework. 22 | 23 | 8. If it still does not work, please [contact us](https://support.hockeyapp.net/discussion/new). 24 | 25 | -------------------------------------------------------------------------------- /Documentation/Guides/Migration.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | 3 | This guide will help you migrate from HockeySDK-Mac version 1.x to the latest release of the unified HockeySDK for Mac. 4 | 5 | First of all we will cleanup the obsolete installation files and then convert your existing code to the new API calls. 6 | 7 | ## Cleanup 8 | 9 | First of all you should remove all files from prior versions of either HockeySDK-Mac. If you not sure which files you added, here are a few easy steps. 10 | 11 | ### HockeySDK-Mac v1.x 12 | 13 | In Xcode open the `Project Navigator` (⌘+1). In the search field at the bottom enter `HockeySDK.framework`. If search returns any results you have the first release of our unified SDK added to your project. Even if you added it as a git submodule we would suggest you remove it first. 14 | 15 | ### Final Steps 16 | 17 | Search again in the `Project Navigator` (⌘+1) for "CrashReporter.framework". You shouldn't get any results now. If not, remove the CrashReporter.framework from your project. 18 | 19 | ## Installation 20 | 21 | Follow the steps in our installation guide [Installation & Setup](Guide-Installation-Setup). 22 | 23 | After you finished the steps for either of the installation procedures, we have to migrate your existing code. 24 | 25 | ## Setup 26 | 27 | ### HockeySDK-Mac 1.x 28 | 29 | There might be minor to the SDK setup code required. Some delegates methods are deprecated and have to be replaced. 30 | 31 | - The protocol `BITCrashReportManagerDelegate` has been replaced by `BITCrashManagerDelegate`. 32 | - A new protocol `BITHockeyManagerDelegate` which also implements `BITCrashManagerDelegate` has been introduced and should be used in the appDelegate 33 | - The class `BITCrashReportManager` has been replaced by `BITCrashManager` and is no singleton any longer 34 | - The properties `userName` and `userEmail` of `BITCrashReportManager` are now delegates of `BITHockeyManagerDelegate` 35 | - `- (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager;` 36 | - `- (NSString *)userEmailForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager;` 37 | - The required delegate `crashReportApplicationLog` is replaced by `-(NSString *)applicationLogForCrashManager:(id)crashManager` 38 | - The property `loggingEnabled` in `BITHockeyManager` has been replaced by the property `debugLogEnabled` 39 | 40 | ### HockeySDK-Mac 2.x 41 | 42 | - The call `[BITHockeyManager configureWithIdentifier:companyName:delegate:]` has been deprecated. Use either `[BITHockeyManager configureWithIdentifier:delegate:]` or `[BITHockeyManager configureWithIdentifier:]` 43 | 44 | - The delegate `[BITCrashManager showMainApplicationWindowForCrashManager:]` has been deprecated. 45 | 46 | - The property `BITCrashManager.enableMachExceptionHandler` is now deprecated since Mach Exception Handler is no enabled by default. Use `BITCrashManager.disableMachExceptionHandler` to disable it. 47 | 48 | - The crash report window is not presented modal any longer! If you are presenting a window and give it focus, this might hide the crash report UI. 49 | 50 | ### Troubleshooting 51 | 52 | Error message: 53 | 54 | dyld: Library not loaded: @rpath/HockeySDK.framework/Versions/A/HockeySDK 55 | Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/HockeyMac/Build/Products/Debug/APPNAME.app/Contents/MacOS/APPNAME 56 | Reason: image not found 57 | 58 | Solution: Add the following entry to your `Runpath Search Paths` in the targets build settings 59 | 60 | @loader_path/../Frameworks -------------------------------------------------------------------------------- /Documentation/Guides/Upload Symbols.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | 3 | Mac and iOS crash reports show the stack traces for all running threads of your app of the time a crash occurred. But the stack traces only contain memory addresses and don't show class names, methods, file names and line numbers that are needed to understand them. 4 | 5 | To get these memory addresses translated you need to upload a dSYM package to the server, which contains all information required to make this happen. The symbolication process will then check the binary images section of the crash report and grab the UUID of the binary that caused the crash. Next it will get the UUID of the dSYM package to make sure they are identical and process the data if so. 6 | 7 | **WARNING:** Every time you are doing a build, the app binary and the dSYM will get a new unique UUID, no matter if you changed the code or not. So make sure to archive all your binaries and dSYMs that you are using for beta or app store builds! 8 | 9 | ## HowTo 10 | 11 | Once you have your app ready for beta testing or even to submit it to the App Store, you need to upload the `.dSYM` bundle to HockeyApp to enable symbolication. If you have built your app with Xcode4, menu `Product` > `Archive`, you can find the `.dSYM` as follows: 12 | 13 | 1. Chose `Window` > `Organizer` in Xcode. 14 | 2. Select the tab Archives. 15 | 3. Select your app in the left sidebar. 16 | 4. Right-click on the latest archive and select `Show in Finder`. 17 | 5. Right-click the `.xcarchive` in Finder and select `Show Package Contents`. 18 | 6. You should see a folder named dSYMs which contains your dSYM bundle. If you use Safari, just drag this file from Finder and drop it on to the corresponding drop zone in HockeyApp. If you use another browser, copy the file to a different location, then right-click it and choose Compress `YourApp.dSYM`. The file will be compressed as a .zip file. Drag & drop this file to HockeyApp. 19 | 20 | ## Mac Desktop Uploader 21 | 22 | As an alternative, you can use our [HockeyMac](Guide-Installation-Mac-App) app to upload the complete archive in one step. You can even integrate HockeyMac into Xcode to automatically show the upload interface after archiving your app, which would make all steps 1 to 6 not necessary any more! 23 | 24 | Check out the [Mac Desktop Uploader Guide](Guide-Installation-Mac-App). -------------------------------------------------------------------------------- /Documentation/HockeySDK/.jazzy.yaml: -------------------------------------------------------------------------------- 1 | objc: true 2 | clean: true 3 | sdk: macosx 4 | 5 | module: HockeySDK 6 | module_version: 5.1.1 7 | author: Microsoft Corp 8 | author_url: https://www.microsoft.com 9 | 10 | readme: ../../README.md 11 | documentation: ../Guides/*.md 12 | custom_categories: 13 | - name: Guides 14 | children: 15 | - Installation & Setup 16 | - Installation Mac App 17 | - Migration 18 | - name: How To 19 | children: 20 | - App Versioning 21 | - Upload Symbols 22 | - name: Troubleshooting 23 | children: 24 | - Crash Reporting Not Working 25 | - name: Release Notes 26 | children: 27 | - Changelog 28 | 29 | umbrella_header: ../../Classes/HockeySDK.h 30 | framework_root: ../../Classes 31 | 32 | root_url: https://support.hockeyapp.net/kb/api 33 | github_url: https://github.com/bitstadium/HockeySDK-Mac/ 34 | github_file_prefix: "https://github.com/bitstadium/HockeySDK-Mac/" 35 | 36 | skip_undocumented: true 37 | 38 | output: Generated/ 39 | -------------------------------------------------------------------------------- /HockeySDK-Mac.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'HockeySDK-Mac' 3 | s.version = '5.1.1' 4 | 5 | s.summary = 'Collect live crash reports, get feedback from your users, distribute your betas, and get usage data.' 6 | s.description = <<-DESC 7 | HockeyApp is a service to distribute beta apps, collect crash reports as well as usage data and 8 | communicate with your app's users. 9 | 10 | It improves the testing process dramatically and can be used for both beta 11 | and App Store builds. 12 | DESC 13 | 14 | s.homepage = 'http://hockeyapp.net/' 15 | s.documentation_url = "http://hockeyapp.net/help/sdk/mac/#{s.version}/" 16 | 17 | s.license = { :type => 'MIT', :file => 'HockeySDK-Mac/LICENSE.md' } 18 | s.author = { 'Microsoft' => 'support@hockeyapp.net' } 19 | s.source = { :http => "https://github.com/bitstadium/HockeySDK-Mac/releases/download/#{s.version}/HockeySDK-Mac-#{s.version}.zip" } 20 | 21 | s.platform = :osx, '10.9' 22 | s.osx.deployment_target = '10.9' 23 | s.requires_arc = false 24 | 25 | s.vendored_frameworks = "HockeySDK-Mac/HockeySDK.framework" 26 | s.resource = "HockeySDK-Mac/HockeySDK.framework" 27 | s.pod_target_xcconfig = { 'LD_RUNPATH_SEARCH_PATHS' => '@executable_path/../Frameworks' } 28 | 29 | end 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 2 | [![Slack Status](https://slack.hockeyapp.net/badge.svg)](https://slack.hockeyapp.net) 3 | 4 | 5 | # Version 5.1.1 6 | 7 | ## Introduction 8 | 9 | HockeySDK-Mac implements support for using HockeyApp in your Mac applications. 10 | 11 | The following feature is currently supported: 12 | 13 | 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! 14 | 15 | 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. 16 | 17 | 3. **Feedback:** Collect feedback from your users from within your app and communicate directly with them using the HockeyApp backend. 18 | 19 | 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. 20 | 21 | ## 1. Setup 22 | 23 | It is super easy to use HockeyApp in your macOS app. Have a look at our [documentation](https://www.hockeyapp.net/help/sdk/mac/5.1.0/installation--setup.html) and onboard your app within minutes. 24 | 25 | ## 2. Documentation 26 | 27 | Please visit [our landing page](https://www.hockeyapp.net/help/sdk/mac/5.1.0/index.html) as a starting point for all of our documentation. 28 | 29 | Please check out our [changelog](http://www.hockeyapp.net/help/sdk/mac/5.1.0/changelog.html), as well as our [troubleshooting section](https://www.hockeyapp.net/help/sdk/mac/5.1.0/installation--setup.html#troubleshooting). 30 | 31 | ## 3. Contributing 32 | 33 | We're looking forward to your contributions via pull requests. 34 | 35 | ### 3.1 Development environment 36 | 37 | * A Mac running the latest version of macOS. 38 | * The latest Xcode from the Mac App Store. 39 | * [Jazzy](https://github.com/realm/jazzy) to generate documentation. 40 | * [CocoaPods](https://cocoapods.org/) to test integration with CocoaPods. 41 | * [Carthage](https://github.com/Carthage/Carthage) to test integration with Carthage. 42 | 43 | ### 3.2 Code of Conduct 44 | 45 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 46 | 47 | ### 3.3 Contributor License 48 | 49 | You must sign a [Contributor License Agreement](https://cla.microsoft.com/) before submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to submit a request via the [form](https://cla.microsoft.com/) and then electronically sign the CLA when you receive the email containing the link to the document. You need to sign the CLA only once to cover submission to any Microsoft OSS project. 50 | 51 | ## 4. Contact 52 | 53 | If you have further questions or are running into trouble that cannot be resolved by any of the steps [in our troubleshooting section](hhttps://www.hockeyapp.net/help/sdk/mac/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). 54 | -------------------------------------------------------------------------------- /Resources/HockeySDK-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | ${VERSION_STRING} 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | ${BUILD_NUMBER} 25 | NSHumanReadableCopyright 26 | Copyright © Microsoft Corporation. All rights reserved. 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Resources/HockeySDK-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'HockeySDK' target in the 'HockeySDK' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Resources/de.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Window title string, with placeholder for the AppName */ 2 | "WindowTitle" = "Problembericht für %@"; 3 | 4 | /* Introduction text, with app name placeholder first and company placeholder second */ 5 | "IntroductionText" = "%@ wurde unerwartet beendet. Möchten Sie einen Bericht senden, sodass wir das Problem beheben können?"; 6 | 7 | /* Name Text Title */ 8 | "NameTextTitle" = "Name"; 9 | 10 | /* Email Text Title */ 11 | "EmailTextTitle" = "Email"; 12 | 13 | /* Comments Disclosure Text */ 14 | "CommentsDisclosureTitle" = "Kommentare"; 15 | 16 | /* User description placeholder */ 17 | "UserDescriptionPlaceholder" = "Bitte beschreiben Sie hier die Schritte welche zu dem Problem geführt haben"; 18 | 19 | /* Problems Details Box Title */ 20 | "ProblemDetailsTitle" = "Problemdetails und Systemkonfiguration"; 21 | 22 | /* Privacy note text */ 23 | "PrivacyNote" = "Es werden nur die dargestellten Informationen mit diesem Bericht verschickt."; 24 | 25 | /* Show Details Button */ 26 | "ShowDetailsButtonTitle" = "Details einblenden"; 27 | 28 | /* HIde Details Button */ 29 | "HideDetailsButtonTitle" = "Details ausblenden"; 30 | 31 | /* Cancel Button */ 32 | "CancelButtonTitle" = "Abbrechen"; 33 | 34 | /* Send Button */ 35 | "SendButtonTitle" = "Senden"; 36 | 37 | 38 | /* Feedback UI */ 39 | 40 | /* Compose view placeholder text */ 41 | "FeedbackComposePlaceHolder" = "Ihr Feedback"; 42 | 43 | /* Last Update in Status Bar */ 44 | "FeedbackLastUpdate" = "Letzte Aktualisierung:"; 45 | 46 | /* Never in Status Bar */ 47 | "FeedbackLastUpdateNever" = "Nie"; 48 | 49 | /* From text between timestamp and author */ 50 | "FeedbackFrom" = "von"; 51 | 52 | /* Send button title */ 53 | "FeedbackSendButton" = "Senden"; 54 | 55 | /* Contact info text */ 56 | "FeedbackContactInfo" = "Bitte geben Sie Ihre Kontaktdaten an"; 57 | 58 | /* Name placeholder text */ 59 | "FeedbackName" = "Name"; 60 | 61 | /* Email placeholder text */ 62 | "FeedbackEmail" = "Email"; 63 | 64 | /* Continue button title */ 65 | "FeedbackContinueButton" = "Weiter"; 66 | 67 | /* Attachment context menu action Preview */ 68 | "FeedbackAttachmentMenuPreview" = "Vorschau"; 69 | 70 | /* Attachment context menu action Remove */ 71 | "FeedbackAttachmentMenuRemove" = "Entfernen"; 72 | 73 | -------------------------------------------------------------------------------- /Resources/en.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Crash dialog */ 2 | 3 | /* Window title string, with placeholder for the AppName */ 4 | "WindowTitle" = "Problem Report for %@"; 5 | 6 | /* Introduction text, with app name placeholder first and company placeholder second */ 7 | "IntroductionText" = "%@ unexpectedly quit. Would you like to send a report so we can fix the problem?"; 8 | 9 | /* Name Text Title */ 10 | "NameTextTitle" = "Name"; 11 | 12 | /* Email Text Title */ 13 | "EmailTextTitle" = "Email"; 14 | 15 | /* Comments Disclosure Text */ 16 | "CommentsDisclosureTitle" = "Comments"; 17 | 18 | /* User description placeholder */ 19 | "UserDescriptionPlaceholder" = "Please describe any steps needed to trigger the problem"; 20 | 21 | /* Problems Details Box Title */ 22 | "ProblemDetailsTitle" = "Problem details and system configuration"; 23 | 24 | /* Privacy note text */ 25 | "PrivacyNote" = "Only the presented data will be sent with this report."; 26 | 27 | /* Show Details Button */ 28 | "ShowDetailsButtonTitle" = "Show Details"; 29 | 30 | /* Hide Details Button */ 31 | "HideDetailsButtonTitle" = "Hide Details"; 32 | 33 | /* Cancel Button */ 34 | "CancelButtonTitle" = "Cancel"; 35 | 36 | /* Send Button */ 37 | "SendButtonTitle" = "Send"; 38 | 39 | 40 | /* Feedback UI */ 41 | 42 | /* Compose view placeholder text */ 43 | "FeedbackComposePlaceHolder" = "Your Feedback"; 44 | 45 | /* Last Update in Status Bar */ 46 | "FeedbackLastUpdate" = "Last Update:"; 47 | 48 | /* Never in Status Bar */ 49 | "FeedbackLastUpdateNever" = "Never"; 50 | 51 | /* From text between timestamp and author */ 52 | "FeedbackFrom" = "from"; 53 | 54 | /* Send button title */ 55 | "FeedbackSendButton" = "Send"; 56 | 57 | /* Contact info text */ 58 | "FeedbackContactInfo" = "Please provide your contact information"; 59 | 60 | /* Name placeholder text */ 61 | "FeedbackName" = "Name"; 62 | 63 | /* Email placeholder text */ 64 | "FeedbackEmail" = "Email"; 65 | 66 | /* Continue button title */ 67 | "FeedbackContinueButton" = "Continue"; 68 | 69 | /* Attachment context menu action Preview */ 70 | "FeedbackAttachmentMenuPreview" = "Preview"; 71 | 72 | /* Attachment context menu action Remove */ 73 | "FeedbackAttachmentMenuRemove" = "Remove"; 74 | -------------------------------------------------------------------------------- /Resources/fi.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Window title string, with placeholder for the AppName */ 2 | "WindowTitle" = "Ongelmaraportti kohteelle %@"; 3 | 4 | /* Introduction text, with app name placeholder first and company placeholder second */ 5 | "IntroductionText" = "%@ päättyi odottamatta, kun sitä käytettiin viimeksi. Haluatko lähettää virheraportin?"; 6 | 7 | /* Name Text Title */ 8 | "NameTextTitle" = "Nimi"; 9 | 10 | /* Email Text Title */ 11 | "EmailTextTitle" = "Sähköposti"; 12 | 13 | /* Comments Disclosure Text */ 14 | "CommentsDisclosureTitle" = "Kommentit"; 15 | 16 | /* User description placeholder */ 17 | "UserDescriptionPlaceholder" = "Syötä viestisi tähän. Jos raportoit virheen, ilmoita käytössäsi olevan Macin tiedot ja käyttöjärjestelmän versio sekä suorittamasi työvaiheet ongelman toistamista varten.\n\nMuista antaa sähköpostiosoitteesi, koska muuten emme voi ottaa sinuun yhteyttä."; 18 | 19 | /* Problems Details Box Title */ 20 | "ProblemDetailsTitle" = "Ongelman tiedot ja järjestelmän määritykset"; 21 | 22 | /* Privacy note text */ 23 | "PrivacyNote" = "Tämän raportin mukana ei lähetetä mitään henkilökohtaisia tietoja."; 24 | 25 | /* Show Details Button */ 26 | "ShowDetailsButtonTitle" = "Näytä tiedot"; 27 | 28 | /* HIde Details Button */ 29 | "HideDetailsButtonTitle" = "Piilota tiedot"; 30 | 31 | /* Cancel Button */ 32 | "CancelButtonTitle" = "Peruuta"; 33 | 34 | /* Send Button */ 35 | "SendButtonTitle" = "Lähetä"; 36 | 37 | 38 | /* Feedback UI */ 39 | 40 | /* Compose view placeholder text */ 41 | "FeedbackComposePlaceHolder" = "Your Feedback"; 42 | 43 | /* Last Update in Status Bar */ 44 | "FeedbackLastUpdate" = "Last Update:"; 45 | 46 | /* Never in Status Bar */ 47 | "FeedbackLastUpdateNever" = "Never"; 48 | 49 | /* From text between timestamp and author */ 50 | "FeedbackFrom" = "from"; 51 | 52 | /* Send button title */ 53 | "FeedbackSendButton" = "Send"; 54 | 55 | /* Contact info text */ 56 | "FeedbackContactInfo" = "Please provide your contact information"; 57 | 58 | /* Name placeholder text */ 59 | "FeedbackName" = "Name"; 60 | 61 | /* Email placeholder text */ 62 | "FeedbackEmail" = "Email"; 63 | 64 | /* Continue button title */ 65 | "FeedbackContinueButton" = "Continue"; 66 | 67 | /* Attachment context menu action Preview */ 68 | "FeedbackAttachmentMenuPreview" = "Preview"; 69 | 70 | /* Attachment context menu action Remove */ 71 | "FeedbackAttachmentMenuRemove" = "Remove"; 72 | 73 | -------------------------------------------------------------------------------- /Resources/fr.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Window title string, with placeholder for the AppName */ 2 | "WindowTitle" = "Rapport de problèmes pour %@"; 3 | 4 | /* Introduction text, with app name placeholder first and company placeholder second */ 5 | "IntroductionText" = "%@ s’est arrêté automatiquement lors de sa dernière utilisation. Souhaitez-vous envoyer un rapport de plantage aux developperus de l’application?"; 6 | 7 | /* Name Text Title */ 8 | "NameTextTitle" = "Nom"; 9 | 10 | /* Email Text Title */ 11 | "EmailTextTitle" = "Email"; 12 | 13 | /* Comments Disclosure Text */ 14 | "CommentsDisclosureTitle" = "Commentaires"; 15 | 16 | /* User description placeholder */ 17 | "UserDescriptionPlaceholder" = "Saisissez votre message ci-dessous. Si vous signalez un problème, veuillez inclure des informations concernant votre Mac, la version de votre système et la liste des étapes que vous avez effectuées pour aider à reproduire le problème.\n\nVeuillez inscrire votre adresse e-mail pour que nous puissions vous contacter."; 18 | 19 | /* Problems Details Box Title */ 20 | "ProblemDetailsTitle" = "Détails des problèmes et configuration du système"; 21 | 22 | /* Privacy note text */ 23 | "PrivacyNote" = "Aucune donnée personnelle ne sera envoyée dans ce rapport."; 24 | 25 | /* Show Details Button */ 26 | "ShowDetailsButtonTitle" = "Afficher les détails"; 27 | 28 | /* HIde Details Button */ 29 | "HideDetailsButtonTitle" = "Cacher les détails"; 30 | 31 | /* Cancel Button */ 32 | "CancelButtonTitle" = "Annuler"; 33 | 34 | /* Send Button */ 35 | "SendButtonTitle" = "Envoyer"; 36 | 37 | 38 | /* Feedback UI */ 39 | 40 | /* Compose view placeholder text */ 41 | "FeedbackComposePlaceHolder" = "Your Feedback"; 42 | 43 | /* Last Update in Status Bar */ 44 | "FeedbackLastUpdate" = "Last Update:"; 45 | 46 | /* Never in Status Bar */ 47 | "FeedbackLastUpdateNever" = "Never"; 48 | 49 | /* From text between timestamp and author */ 50 | "FeedbackFrom" = "from"; 51 | 52 | /* Send button title */ 53 | "FeedbackSendButton" = "Send"; 54 | 55 | /* Contact info text */ 56 | "FeedbackContactInfo" = "Please provide your contact information"; 57 | 58 | /* Name placeholder text */ 59 | "FeedbackName" = "Name"; 60 | 61 | /* Email placeholder text */ 62 | "FeedbackEmail" = "Email"; 63 | 64 | /* Continue button title */ 65 | "FeedbackContinueButton" = "Continue"; 66 | 67 | /* Attachment context menu action Preview */ 68 | "FeedbackAttachmentMenuPreview" = "Preview"; 69 | 70 | /* Attachment context menu action Remove */ 71 | "FeedbackAttachmentMenuRemove" = "Remove"; 72 | 73 | -------------------------------------------------------------------------------- /Resources/it.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Window title string, with placeholder for the AppName */ 2 | "WindowTitle" = "Rapporto di problemi per %@"; 3 | 4 | /* Introduction text, with app name placeholder first and company placeholder second */ 5 | "IntroductionText" = "%@ si è chiusa inaspettatamente. Vuoi inviare un report con i dettagli del crash per aiutarci a risolvere il problema?"; 6 | 7 | 8 | /* Name Text Title */ 9 | "NameTextTitle" = "Nome"; 10 | 11 | /* Email Text Title */ 12 | "EmailTextTitle" = "Email"; 13 | 14 | /* Comments Disclosure Text */ 15 | "CommentsDisclosureTitle" = "Commenti"; 16 | 17 | /* User description placeholder */ 18 | "UserDescriptionPlaceholder" = "Indicare qui le informazioni relative al proprio Mac e le operazioni che hanno portato al problema.\n\nIndicare inoltre anche l'indirizzo e-mail per permetterci eventualmente di contattarla."; 19 | 20 | /* Problems Details Box Title */ 21 | "ProblemDetailsTitle" = "Dettagli dei problemi e configurazione del sistema"; 22 | 23 | /* Privacy note text */ 24 | "PrivacyNote" = "Con questo rapporto non verranno inviate alcune informazioni personali."; 25 | 26 | /* Show Details Button */ 27 | "ShowDetailsButtonTitle" = "Visualizza dettagli"; 28 | 29 | /* HIde Details Button */ 30 | "HideDetailsButtonTitle" = "Nascondi dettagli"; 31 | 32 | /* Cancel Button */ 33 | "CancelButtonTitle" = "Annulla"; 34 | 35 | /* Send Button */ 36 | "SendButtonTitle" = "Invia"; 37 | 38 | 39 | /* Feedback UI */ 40 | 41 | /* Compose view placeholder text */ 42 | "FeedbackComposePlaceHolder" = "Your Feedback"; 43 | 44 | /* Last Update in Status Bar */ 45 | "FeedbackLastUpdate" = "Last Update:"; 46 | 47 | /* Never in Status Bar */ 48 | "FeedbackLastUpdateNever" = "Never"; 49 | 50 | /* From text between timestamp and author */ 51 | "FeedbackFrom" = "from"; 52 | 53 | /* Send button title */ 54 | "FeedbackSendButton" = "Send"; 55 | 56 | /* Contact info text */ 57 | "FeedbackContactInfo" = "Please provide your contact information"; 58 | 59 | /* Name placeholder text */ 60 | "FeedbackName" = "Name"; 61 | 62 | /* Email placeholder text */ 63 | "FeedbackEmail" = "Email"; 64 | 65 | /* Continue button title */ 66 | "FeedbackContinueButton" = "Continue"; 67 | 68 | /* Attachment context menu action Preview */ 69 | "FeedbackAttachmentMenuPreview" = "Preview"; 70 | 71 | /* Attachment context menu action Remove */ 72 | "FeedbackAttachmentMenuRemove" = "Remove"; 73 | 74 | -------------------------------------------------------------------------------- /Resources/ja.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Window title string, with placeholder for the AppName */ 2 | "WindowTitle" = "%@障害報告"; 3 | 4 | /* Introduction text, with app name placeholder first and company placeholder second */ 5 | "IntroductionText" = "%@が予期しない理由で終了。問題が修正できるよう、レポートを送信しますか?"; 6 | 7 | /* Name Text Title */ 8 | "NameTextTitle" = "お名前"; 9 | 10 | /* Email Text Title */ 11 | "EmailTextTitle" = "メールアドレス"; 12 | 13 | /* Comments Disclosure Text */ 14 | "CommentsDisclosureTitle" = "コメント欄"; 15 | 16 | /* User description placeholder */ 17 | "UserDescriptionPlaceholder" = "再現手順がわかりましたらご記述ください。"; 18 | 19 | /* Problems Details Box Title */ 20 | "ProblemDetailsTitle" = "障害の詳細、システム構成情報"; 21 | 22 | /* Privacy note text */ 23 | "PrivacyNote" = "報告内容に個人情報は含まれておりません。"; 24 | 25 | /* Show Details Button */ 26 | "ShowDetailsButtonTitle" = "詳細を表示"; 27 | 28 | /* HIde Details Button */ 29 | "HideDetailsButtonTitle" = "詳細を隠す"; 30 | 31 | /* Cancel Button */ 32 | "CancelButtonTitle" = "キャンセル"; 33 | 34 | /* Send Button */ 35 | "SendButtonTitle" = "送信"; 36 | 37 | 38 | /* Feedback UI */ 39 | 40 | /* Compose view placeholder text */ 41 | "FeedbackComposePlaceHolder" = "Your Feedback"; 42 | 43 | /* Last Update in Status Bar */ 44 | "FeedbackLastUpdate" = "Last Update:"; 45 | 46 | /* Never in Status Bar */ 47 | "FeedbackLastUpdateNever" = "Never"; 48 | 49 | /* From text between timestamp and author */ 50 | "FeedbackFrom" = "from"; 51 | 52 | /* Send button title */ 53 | "FeedbackSendButton" = "Send"; 54 | 55 | /* Contact info text */ 56 | "FeedbackContactInfo" = "Please provide your contact information"; 57 | 58 | /* Name placeholder text */ 59 | "FeedbackName" = "Name"; 60 | 61 | /* Email placeholder text */ 62 | "FeedbackEmail" = "Email"; 63 | 64 | /* Continue button title */ 65 | "FeedbackContinueButton" = "Continue"; 66 | 67 | /* Attachment context menu action Preview */ 68 | "FeedbackAttachmentMenuPreview" = "Preview"; 69 | 70 | /* Attachment context menu action Remove */ 71 | "FeedbackAttachmentMenuRemove" = "Remove"; 72 | 73 | -------------------------------------------------------------------------------- /Resources/nb.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Window title string, with placeholder for the AppName */ 2 | "WindowTitle" = "Problemrapport for %@"; 3 | 4 | /* Introduction text, with app name placeholder first and company placeholder second */ 5 | "IntroductionText" = "%@ ble avsluttet uventet ved siste gangs kjøring. Ønsker du å sende en feilrapport?"; 6 | 7 | /* Name Text Title */ 8 | "NameTextTitle" = "Navn"; 9 | 10 | /* Email Text Title */ 11 | "EmailTextTitle" = "E-post"; 12 | 13 | /* Comments Disclosure Text */ 14 | "CommentsDisclosureTitle" = "Kommentarer"; 15 | 16 | /* User description placeholder */ 17 | "UserDescriptionPlaceholder" = "Her kan du gi informasjon om din Mac og trinnene som førte til problemet.\n\nDu kan angi din e-postadresse, slik at vi evt. kan ta kontakt med deg."; 18 | 19 | /* Problems Details Box Title */ 20 | "ProblemDetailsTitle" = "Problemdetaljer og systemkonfigurasjon"; 21 | 22 | /* Privacy note text */ 23 | "PrivacyNote" = "Det blir ikke sendt noen personopplysninger med denne rapporten"; 24 | 25 | /* Show Details Button */ 26 | "ShowDetailsButtonTitle" = "Vis detaljer"; 27 | 28 | /* HIde Details Button */ 29 | "HideDetailsButtonTitle" = "Skjul detaljer"; 30 | 31 | /* Cancel Button */ 32 | "CancelButtonTitle" = "Avbryt"; 33 | 34 | /* Send Button */ 35 | "SendButtonTitle" = "Send"; 36 | 37 | 38 | /* Feedback UI */ 39 | 40 | /* Compose view placeholder text */ 41 | "FeedbackComposePlaceHolder" = "Your Feedback"; 42 | 43 | /* Last Update in Status Bar */ 44 | "FeedbackLastUpdate" = "Last Update:"; 45 | 46 | /* Never in Status Bar */ 47 | "FeedbackLastUpdateNever" = "Never"; 48 | 49 | /* From text between timestamp and author */ 50 | "FeedbackFrom" = "from"; 51 | 52 | /* Send button title */ 53 | "FeedbackSendButton" = "Send"; 54 | 55 | /* Contact info text */ 56 | "FeedbackContactInfo" = "Please provide your contact information"; 57 | 58 | /* Name placeholder text */ 59 | "FeedbackName" = "Name"; 60 | 61 | /* Email placeholder text */ 62 | "FeedbackEmail" = "Email"; 63 | 64 | /* Continue button title */ 65 | "FeedbackContinueButton" = "Continue"; 66 | 67 | /* Attachment context menu action Preview */ 68 | "FeedbackAttachmentMenuPreview" = "Preview"; 69 | 70 | /* Attachment context menu action Remove */ 71 | "FeedbackAttachmentMenuRemove" = "Remove"; 72 | 73 | -------------------------------------------------------------------------------- /Resources/sv.lproj/HockeySDK.strings: -------------------------------------------------------------------------------- 1 | /* Window title string, with placeholder for the AppName */ 2 | "WindowTitle" = "Felrapport för %@"; 3 | 4 | /* Introduction text, with app name placeholder first and company placeholder second */ 5 | "IntroductionText" = "%@ slutade tvärt att fungera förra gången. Vill du skicka en felrapport?"; 6 | 7 | /* Name Text Title */ 8 | "NameTextTitle" = "Namn"; 9 | 10 | /* Email Text Title */ 11 | "EmailTextTitle" = "E-post"; 12 | 13 | /* Comments Disclosure Text */ 14 | "CommentsDisclosureTitle" = "Kommentarer"; 15 | 16 | /* User description placeholder */ 17 | "UserDescriptionPlaceholder" = "Fyll i uppgifterna om din Mac och stegen som ledde till problemet.\n\nOm du fyller i din e-postadress kan vi kontakta dig vid behov."; 18 | 19 | /* Problems Details Box Title */ 20 | "ProblemDetailsTitle" = "Uppgifter om problemet och systemets konfiguration"; 21 | 22 | /* Privacy note text */ 23 | "PrivacyNote" = "Denna rapport innehåller inga personliga uppgifter."; 24 | 25 | /* Show Details Button */ 26 | "ShowDetailsButtonTitle" = "Visa detaljerna"; 27 | 28 | /* HIde Details Button */ 29 | "HideDetailsButtonTitle" = "Dölj detaljerna"; 30 | 31 | /* Cancel Button */ 32 | "CancelButtonTitle" = "Avbryt"; 33 | 34 | /* Send Button */ 35 | "SendButtonTitle" = "Skicka"; 36 | 37 | 38 | /* Feedback UI */ 39 | 40 | /* Compose view placeholder text */ 41 | "FeedbackComposePlaceHolder" = "Your Feedback"; 42 | 43 | /* Last Update in Status Bar */ 44 | "FeedbackLastUpdate" = "Last Update:"; 45 | 46 | /* Never in Status Bar */ 47 | "FeedbackLastUpdateNever" = "Never"; 48 | 49 | /* From text between timestamp and author */ 50 | "FeedbackFrom" = "from"; 51 | 52 | /* Send button title */ 53 | "FeedbackSendButton" = "Send"; 54 | 55 | /* Contact info text */ 56 | "FeedbackContactInfo" = "Please provide your contact information"; 57 | 58 | /* Name placeholder text */ 59 | "FeedbackName" = "Name"; 60 | 61 | /* Email placeholder text */ 62 | "FeedbackEmail" = "Email"; 63 | 64 | /* Continue button title */ 65 | "FeedbackContinueButton" = "Continue"; 66 | 67 | /* Attachment context menu action Preview */ 68 | "FeedbackAttachmentMenuPreview" = "Preview"; 69 | 70 | /* Attachment context menu action Remove */ 71 | "FeedbackAttachmentMenuRemove" = "Remove"; 72 | 73 | -------------------------------------------------------------------------------- /Support/BITPersistenceTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BITPersistenceTests.m 3 | // HockeySDK 4 | // 5 | // Created by Patrick Dinger on 24/05/16. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | #import "BITPersistence.h" 12 | #import "BITPersistencePrivate.h" 13 | 14 | @interface BITPersistenceTests : XCTestCase 15 | 16 | @property (strong) BITPersistence *sut; 17 | 18 | @end 19 | 20 | @implementation BITPersistenceTests 21 | 22 | - (void)setUp { 23 | [super setUp]; 24 | self.sut = [BITPersistence alloc]; 25 | id mock = OCMPartialMock(self.sut); 26 | 27 | OCMStub([mock bundleIdentifier]).andReturn(@"com.testapp"); 28 | } 29 | 30 | - (void)tearDown { 31 | [super tearDown]; 32 | } 33 | 34 | - (void)testAppHockeySDKDirectoryPath { 35 | NSString *path = [self.sut appHockeySDKDirectoryPath]; 36 | 37 | NSString *appSupportPath = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) lastObject] stringByStandardizingPath]; 38 | NSString *validPath = [NSString stringWithFormat:@"%@/%@", appSupportPath, @"com.testapp/com.microsoft.HockeyApp"]; 39 | 40 | XCTAssertEqualObjects(path, validPath); 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Support/HockeySDK.xcconfig: -------------------------------------------------------------------------------- 1 | HOCKEYSDK_DOCSET_NAME=HockeySDK-Mac 2 | GCC_PREPROCESSOR_DEFINITIONS=$(inherited) CONFIGURATION_$(CONFIGURATION) 3 | 4 | // Turn off -Wobjc-messaging-id on Xcode 10 5 | WARNING_CFLAGS_PER_SDK[sdk=macosx10.14] = -Wno-objc-messaging-id 6 | WARNING_CFLAGS = -Weverything -Wno-objc-missing-property-synthesis -Wno-float-equal -Wno-pedantic -Wno-padded -Wno-sign-conversion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-auto-import -Wno-assign-enum -Wno-exit-time-destructors -Wno-global-constructors -Wno-cast-align -Wno-reserved-id-macro -Wno-disabled-macro-expansion -Wno-objc-interface-ivars -Wno-documentation-unknown-command -Wno-switch-enum -Wno-format-nonliteral $(WARNING_CFLAGS_PER_SDK) 7 | 8 | // These are all partially (but not completely?) independent of WARNING_CFLAGS 9 | // and need to be specified explicitly. 10 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES 11 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES 12 | GCC_WARN_ABOUT_RETURN_TYPE = YES 13 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES 14 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES 15 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES 16 | GCC_WARN_MISSING_PARENTHESES = YES 17 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES 18 | GCC_WARN_UNUSED_FUNCTION = YES 19 | GCC_WARN_UNUSED_LABEL = YES 20 | GCC_WARN_UNUSED_PARAMETER = YES 21 | GCC_WARN_UNUSED_VARIABLE = YES 22 | GCC_WARN_UNUSED_VALUE = YES 23 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE 24 | GCC_WARN_UNKNOWN_PRAGMAS = YES 25 | GCC_WARN_SHADOW = YES 26 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES 27 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES 28 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES 29 | GCC_WARN_UNDECLARED_SELECTOR = YES 30 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES 31 | CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES 32 | CLANG_WARN_EMPTY_BODY = YES 33 | CLANG_WARN_CONSTANT_CONVERSION = YES 34 | CLANG_WARN_INT_CONVERSION = YES 35 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR 36 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES 37 | CLANG_WARN_CXX0X_EXTENSIONS = YES 38 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES 39 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES 40 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 41 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 42 | CLANG_WARN_UNREACHABLE_CODE = YES 43 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR 44 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 45 | CLANG_WARN_ENUM_CONVERSION = YES 46 | CLANG_WARN_BOOL_CONVERSION = YES 47 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES 48 | 49 | // Enable extra analyze modes 50 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES 51 | CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES 52 | CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES 53 | CLANG_ANALYZER_NONNULL = YES 54 | -------------------------------------------------------------------------------- /Support/HockeySDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Support/HockeySDK.xcodeproj/project.xcworkspace/xcshareddata/HockeySDK.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "78739728BC2123AD8D9FDD9B7E34B43BD66C9FB5", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "78739728BC2123AD8D9FDD9B7E34B43BD66C9FB5" : 0, 8 | "0CA27A43414FB33F98B16BE18013A983CABB105E" : 0, 9 | "59BFD80C347141A202439470CC28548F4F4022DF" : 0 10 | }, 11 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "4D7EF736-757B-4A90-8BBB-3DE7C9F5AC62", 12 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 13 | "78739728BC2123AD8D9FDD9B7E34B43BD66C9FB5" : "HockeySDK-Mac-Private\/", 14 | "0CA27A43414FB33F98B16BE18013A983CABB105E" : "HockeySDK-iOSDemo-Private\/Vendor\/HockeySDK\/", 15 | "59BFD80C347141A202439470CC28548F4F4022DF" : "HockeySDK-iOSDemo-Private\/" 16 | }, 17 | "DVTSourceControlWorkspaceBlueprintNameKey" : "HockeySDK", 18 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 19 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Support\/HockeySDK.xcodeproj", 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 21 | { 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bitstadium\/HockeySDK-iOS-Private.git", 23 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 24 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "0CA27A43414FB33F98B16BE18013A983CABB105E" 25 | }, 26 | { 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bitstadium\/HockeySDK-iOSDemo-Private.git", 28 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 29 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "59BFD80C347141A202439470CC28548F4F4022DF" 30 | }, 31 | { 32 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/bitstadium\/HockeySDK-Mac-Private.git", 33 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 34 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "78739728BC2123AD8D9FDD9B7E34B43BD66C9FB5" 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /Support/HockeySDK.xcodeproj/xcshareddata/xcschemes/HockeySDK Distribution.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Support/HockeySDK.xcodeproj/xcshareddata/xcschemes/HockeySDK Documentation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Support/HockeySDK.xcodeproj/xcshareddata/xcschemes/libHockeySDK.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Support/HockeySDKTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /Support/OCMock.framework/Modules: -------------------------------------------------------------------------------- 1 | Versions/Current/Modules -------------------------------------------------------------------------------- /Support/OCMock.framework/OCMock: -------------------------------------------------------------------------------- 1 | Versions/Current/OCMock -------------------------------------------------------------------------------- /Support/OCMock.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | 19 | @class OCObserverMockObject; 20 | 21 | 22 | @interface NSNotificationCenter(OCMAdditions) 23 | 24 | - (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMArg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | 19 | @interface OCMArg : NSObject 20 | 21 | // constraining arguments 22 | 23 | + (id)any; 24 | + (SEL)anySelector; 25 | + (void *)anyPointer; 26 | + (id __autoreleasing *)anyObjectRef; 27 | + (id)isNil; 28 | + (id)isNotNil; 29 | + (id)isEqual:(id)value; 30 | + (id)isNotEqual:(id)value; 31 | + (id)isKindOfClass:(Class)cls; 32 | + (id)checkWithSelector:(SEL)selector onObject:(id)anObject; 33 | + (id)checkWithBlock:(BOOL (^)(id obj))block; 34 | 35 | // manipulating arguments 36 | 37 | + (id *)setTo:(id)value; 38 | + (void *)setToValue:(NSValue *)value; 39 | + (id)invokeBlock; 40 | + (id)invokeBlockWithArgs:(id)first,... NS_REQUIRES_NIL_TERMINATION; 41 | 42 | + (id)defaultValue; 43 | 44 | // internal use only 45 | 46 | + (id)resolveSpecialValues:(NSValue *)value; 47 | 48 | @end 49 | 50 | #define OCMOCK_ANY [OCMArg any] 51 | 52 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 53 | #define OCMOCK_VALUE(variable) \ 54 | ({ __typeof__(variable) __v = (variable); [NSValue value:&__v withObjCType:@encode(__typeof__(__v))]; }) 55 | #else 56 | #define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))] 57 | #endif 58 | 59 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMConstraint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | 19 | 20 | @interface OCMConstraint : NSObject 21 | 22 | + (instancetype)constraint; 23 | - (BOOL)evaluate:(id)value; 24 | 25 | // if you are looking for any, isNil, etc, they have moved to OCMArg 26 | 27 | // try to use [OCMArg checkWith...] instead of the constraintWith... methods below 28 | 29 | + (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject; 30 | + (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue; 31 | 32 | 33 | @end 34 | 35 | @interface OCMAnyConstraint : OCMConstraint 36 | @end 37 | 38 | @interface OCMIsNilConstraint : OCMConstraint 39 | @end 40 | 41 | @interface OCMIsNotNilConstraint : OCMConstraint 42 | @end 43 | 44 | @interface OCMIsNotEqualConstraint : OCMConstraint 45 | { 46 | @public 47 | id testValue; 48 | } 49 | 50 | @end 51 | 52 | @interface OCMInvocationConstraint : OCMConstraint 53 | { 54 | @public 55 | NSInvocation *invocation; 56 | } 57 | 58 | @end 59 | 60 | @interface OCMBlockConstraint : OCMConstraint 61 | { 62 | BOOL (^block)(id); 63 | } 64 | 65 | - (instancetype)initWithConstraintBlock:(BOOL (^)(id))block; 66 | 67 | @end 68 | 69 | 70 | #define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self] 71 | #define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)] 72 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMFunctions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | 19 | 20 | #if defined(__cplusplus) 21 | #define OCMOCK_EXTERN extern "C" 22 | #else 23 | #define OCMOCK_EXTERN extern 24 | #endif 25 | 26 | 27 | OCMOCK_EXTERN BOOL OCMIsObjectType(const char *objCType); 28 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMLocation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | #import "OCMFunctions.h" 19 | 20 | 21 | @interface OCMLocation : NSObject 22 | { 23 | id testCase; 24 | NSString *file; 25 | NSUInteger line; 26 | } 27 | 28 | + (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; 29 | 30 | - (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; 31 | 32 | - (id)testCase; 33 | - (NSString *)file; 34 | - (NSUInteger)line; 35 | 36 | @end 37 | 38 | OCMOCK_EXTERN OCMLocation *OCMMakeLocation(id testCase, const char *file, int line); 39 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMMacroState.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | 19 | @class OCMLocation; 20 | @class OCMRecorder; 21 | @class OCMStubRecorder; 22 | @class OCMockObject; 23 | 24 | 25 | @interface OCMMacroState : NSObject 26 | { 27 | OCMRecorder *recorder; 28 | } 29 | 30 | + (void)beginStubMacro; 31 | + (OCMStubRecorder *)endStubMacro; 32 | 33 | + (void)beginExpectMacro; 34 | + (OCMStubRecorder *)endExpectMacro; 35 | 36 | + (void)beginRejectMacro; 37 | + (OCMStubRecorder *)endRejectMacro; 38 | 39 | + (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation; 40 | + (void)endVerifyMacro; 41 | 42 | + (OCMMacroState *)globalState; 43 | 44 | - (OCMRecorder *)recorder; 45 | 46 | - (void)switchToClassMethod; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMRecorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | 19 | @class OCMockObject; 20 | @class OCMInvocationMatcher; 21 | 22 | 23 | @interface OCMRecorder : NSProxy 24 | { 25 | OCMockObject *mockObject; 26 | OCMInvocationMatcher *invocationMatcher; 27 | } 28 | 29 | - (instancetype)init; 30 | - (instancetype)initWithMockObject:(OCMockObject *)aMockObject; 31 | 32 | - (void)setMockObject:(OCMockObject *)aMockObject; 33 | 34 | - (OCMInvocationMatcher *)invocationMatcher; 35 | 36 | - (id)classMethod; 37 | - (id)ignoringNonObjectArgs; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMStubRecorder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | #import 20 | 21 | @interface OCMStubRecorder : OCMRecorder 22 | 23 | - (id)andReturn:(id)anObject; 24 | - (id)andReturnValue:(NSValue *)aValue; 25 | - (id)andThrow:(NSException *)anException; 26 | - (id)andPost:(NSNotification *)aNotification; 27 | - (id)andCall:(SEL)selector onObject:(id)anObject; 28 | - (id)andDo:(void (^)(NSInvocation *invocation))block; 29 | - (id)andForwardToRealObject; 30 | 31 | @end 32 | 33 | 34 | @interface OCMStubRecorder (Properties) 35 | 36 | #define andReturn(aValue) _andReturn(({ \ 37 | __typeof__(aValue) _val = (aValue); \ 38 | NSValue *_nsval = [NSValue value:&_val withObjCType:@encode(__typeof__(_val))]; \ 39 | if (OCMIsObjectType(@encode(__typeof(_val)))) { \ 40 | objc_setAssociatedObject(_nsval, "OCMAssociatedBoxedValue", *(__unsafe_unretained id *) (void *) &_val, OBJC_ASSOCIATION_RETAIN); \ 41 | } \ 42 | _nsval; \ 43 | })) 44 | @property (nonatomic, readonly) OCMStubRecorder *(^ _andReturn)(NSValue *); 45 | 46 | #define andThrow(anException) _andThrow(anException) 47 | @property (nonatomic, readonly) OCMStubRecorder *(^ _andThrow)(NSException *); 48 | 49 | #define andPost(aNotification) _andPost(aNotification) 50 | @property (nonatomic, readonly) OCMStubRecorder *(^ _andPost)(NSNotification *); 51 | 52 | #define andCall(anObject, aSelector) _andCall(anObject, aSelector) 53 | @property (nonatomic, readonly) OCMStubRecorder *(^ _andCall)(id, SEL); 54 | 55 | #define andDo(aBlock) _andDo(aBlock) 56 | @property (nonatomic, readonly) OCMStubRecorder *(^ _andDo)(void (^)(NSInvocation *)); 57 | 58 | #define andForwardToRealObject() _andForwardToRealObject() 59 | @property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void); 60 | 61 | @end 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | 27 | 28 | #define OCMClassMock(cls) [OCMockObject niceMockForClass:cls] 29 | 30 | #define OCMStrictClassMock(cls) [OCMockObject mockForClass:cls] 31 | 32 | #define OCMProtocolMock(protocol) [OCMockObject niceMockForProtocol:protocol] 33 | 34 | #define OCMStrictProtocolMock(protocol) [OCMockObject mockForProtocol:protocol] 35 | 36 | #define OCMPartialMock(obj) [OCMockObject partialMockForObject:obj] 37 | 38 | #define OCMObserverMock() [OCMockObject observerMock] 39 | 40 | 41 | #define OCMStub(invocation) \ 42 | ({ \ 43 | _OCMSilenceWarnings( \ 44 | [OCMMacroState beginStubMacro]; \ 45 | OCMStubRecorder *recorder = nil; \ 46 | @try{ \ 47 | invocation; \ 48 | }@finally{ \ 49 | recorder = [OCMMacroState endStubMacro]; \ 50 | } \ 51 | recorder; \ 52 | ); \ 53 | }) 54 | 55 | #define OCMExpect(invocation) \ 56 | ({ \ 57 | _OCMSilenceWarnings( \ 58 | [OCMMacroState beginExpectMacro]; \ 59 | OCMStubRecorder *recorder = nil; \ 60 | @try{ \ 61 | invocation; \ 62 | }@finally{ \ 63 | recorder = [OCMMacroState endExpectMacro]; \ 64 | } \ 65 | recorder; \ 66 | ); \ 67 | }) 68 | 69 | #define OCMReject(invocation) \ 70 | ({ \ 71 | _OCMSilenceWarnings( \ 72 | [OCMMacroState beginRejectMacro]; \ 73 | OCMStubRecorder *recorder = nil; \ 74 | @try{ \ 75 | invocation; \ 76 | }@finally{ \ 77 | recorder = [OCMMacroState endRejectMacro]; \ 78 | } \ 79 | recorder; \ 80 | ); \ 81 | }) 82 | 83 | #define ClassMethod(invocation) \ 84 | _OCMSilenceWarnings( \ 85 | [[OCMMacroState globalState] switchToClassMethod]; \ 86 | invocation; \ 87 | ); 88 | 89 | 90 | #define OCMVerifyAll(mock) [mock verifyAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)] 91 | 92 | #define OCMVerifyAllWithDelay(mock, delay) [mock verifyWithDelay:delay atLocation:OCMMakeLocation(self, __FILE__, __LINE__)] 93 | 94 | #define OCMVerify(invocation) \ 95 | ({ \ 96 | _OCMSilenceWarnings( \ 97 | [OCMMacroState beginVerifyMacroAtLocation:OCMMakeLocation(self, __FILE__, __LINE__)]; \ 98 | @try{ \ 99 | invocation; \ 100 | }@finally{ \ 101 | [OCMMacroState endVerifyMacro]; \ 102 | } \ 103 | ); \ 104 | }) 105 | 106 | #define _OCMSilenceWarnings(macro) \ 107 | ({ \ 108 | _Pragma("clang diagnostic push") \ 109 | _Pragma("clang diagnostic ignored \"-Wunused-value\"") \ 110 | _Pragma("clang diagnostic ignored \"-Wunused-getter-return-value\"") \ 111 | macro \ 112 | _Pragma("clang diagnostic pop") \ 113 | }) 114 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Headers/OCMockObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2004-2016 Erik Doernenburg and contributors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | * not use these files except in compliance with the License. You may obtain 6 | * a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | #import 18 | 19 | @class OCMLocation; 20 | @class OCMInvocationStub; 21 | @class OCMStubRecorder; 22 | @class OCMInvocationMatcher; 23 | @class OCMInvocationExpectation; 24 | 25 | 26 | @interface OCMockObject : NSProxy 27 | { 28 | BOOL isNice; 29 | BOOL expectationOrderMatters; 30 | NSMutableArray *stubs; 31 | NSMutableArray *expectations; 32 | NSMutableArray *exceptions; 33 | NSMutableArray *invocations; 34 | } 35 | 36 | + (id)mockForClass:(Class)aClass; 37 | + (id)mockForProtocol:(Protocol *)aProtocol; 38 | + (id)partialMockForObject:(NSObject *)anObject; 39 | 40 | + (id)niceMockForClass:(Class)aClass; 41 | + (id)niceMockForProtocol:(Protocol *)aProtocol; 42 | 43 | + (id)observerMock; 44 | 45 | - (instancetype)init; 46 | 47 | - (void)setExpectationOrderMatters:(BOOL)flag; 48 | 49 | - (id)stub; 50 | - (id)expect; 51 | - (id)reject; 52 | 53 | - (id)verify; 54 | - (id)verifyAtLocation:(OCMLocation *)location; 55 | 56 | - (void)verifyWithDelay:(NSTimeInterval)delay; 57 | - (void)verifyWithDelay:(NSTimeInterval)delay atLocation:(OCMLocation *)location; 58 | 59 | - (void)stopMocking; 60 | 61 | // internal use only 62 | 63 | - (void)addStub:(OCMInvocationStub *)aStub; 64 | - (void)addExpectation:(OCMInvocationExpectation *)anExpectation; 65 | 66 | - (BOOL)handleInvocation:(NSInvocation *)anInvocation; 67 | - (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; 68 | - (BOOL)handleSelector:(SEL)sel; 69 | 70 | - (void)verifyInvocation:(OCMInvocationMatcher *)matcher; 71 | - (void)verifyInvocation:(OCMInvocationMatcher *)matcher atLocation:(OCMLocation *)location; 72 | 73 | @end 74 | 75 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module OCMock { 2 | umbrella header "OCMock.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/OCMock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitstadium/HockeySDK-Mac/b9d70d9c490e7969c73cddd798ab22c7305fb1a9/Support/OCMock.framework/Versions/A/OCMock -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14F1713 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | OCMock 11 | CFBundleIdentifier 12 | com.mulle-kybernetik.OCMock 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | OCMock 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 7C68 33 | DTPlatformVersion 34 | GM 35 | DTSDKBuild 36 | 15C43 37 | DTSDKName 38 | macosx10.11 39 | DTXcode 40 | 0720 41 | DTXcodeBuild 42 | 7C68 43 | NSHumanReadableCopyright 44 | Copyright © 2004-2013 Mulle Kybernetik. 45 | 46 | 47 | -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitstadium/HockeySDK-Mac/b9d70d9c490e7969c73cddd798ab22c7305fb1a9/Support/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Support/OCMock.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /Support/buildnumber.xcconfig: -------------------------------------------------------------------------------- 1 | #include "HockeySDK.xcconfig" 2 | 3 | BUILD_NUMBER = 64 4 | VERSION_STRING = 5.1.1 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\""$(VERSION_STRING)"\"" BITHOCKEY_BUILD="@\""$(BUILD_NUMBER)"\"" BITHOCKEY_C_VERSION="\""$(VERSION_STRING)"\"" BITHOCKEY_C_BUILD="\""$(BUILD_NUMBER)"\"" $(XCODEBUILD_GCC_PREPROCESSOR_DEFINITIONS) 6 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashMacros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #ifndef PLCRASH_CONSTANTS_H 30 | #define PLCRASH_CONSTANTS_H 31 | 32 | #include 33 | 34 | #if defined(__cplusplus) 35 | # define PLCR_EXPORT extern "C" 36 | # define PLCR_C_BEGIN_DECLS extern "C" { 37 | # define PLCR_C_END_DECLS } 38 | #else 39 | # define PLCR_EXPORT extern 40 | # define PLCR_C_BEGIN_DECLS 41 | # define PLCR_C_END_DECLS 42 | #endif 43 | 44 | #if defined(__cplusplus) 45 | # if defined(PLCRASHREPORTER_PREFIX) 46 | /** @internal Define the plcrash namespace, automatically inserting an inline namespace containing the configured PLCRASHREPORTER_PREFIX, if any. */ 47 | # define PLCR_CPP_BEGIN_NS namespace plcrash { inline namespace PLCRASHREPORTER_PREFIX { 48 | 49 | /** @internal Close the definition of the `plcrash` namespace (and the PLCRASHREPORTER_PREFIX inline namespace, if any). */ 50 | # define PLCR_CPP_END_NS }} 51 | # else 52 | # define PLCR_CPP_BEGIN_NS namespace plcrash { 53 | # define PLCR_CPP_END_NS } 54 | # endif 55 | #endif 56 | 57 | #ifdef __clang__ 58 | # define PLCR_PRAGMA_CLANG(_p) _Pragma(_p) 59 | #else 60 | # define PLCR_PRAGMA_CLANG(_p) 61 | #endif 62 | 63 | #if defined(__clang__) || defined(__GNUC__) 64 | # define PLCR_UNUSED __attribute__((unused)) 65 | #else 66 | # define PLCR_UNUSED 67 | #endif 68 | 69 | #ifdef PLCR_PRIVATE 70 | /** 71 | * @internal 72 | * Static compile-time assertion. 73 | * 74 | * @param name The assertion name; must be valid for use within a C identifier. 75 | * @param cond Assertion condition 76 | */ 77 | # define PLCR_ASSERT_STATIC(name, cond) PLCR_ASSERT_STATIC_(name, cond, __LINE__) 78 | /* 79 | * C++11 and C11 both provide a static_assert(). 80 | * 81 | * Otherwise, we have to use typedef-based static assertions. 82 | */ 83 | # if (defined(__cplusplus) && __cplusplus >= 201103L) || (!defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) 84 | # define PLCR_ASSERT_STATIC_(name, cond, line) PLCR_ASSERT_STATIC__(#name, cond) 85 | # define PLCR_ASSERT_STATIC__(name, cond) static_assert(cond, #name) 86 | # else 87 | # define PLCR_ASSERT_STATIC_(name, cond, line) PLCR_ASSERT_STATIC__(name, cond, line) 88 | # define PLCR_ASSERT_STATIC__(name, cond, line) typedef int plcf_static_assert_##name##_##line [(cond) ? 1 : -1] PLCR_UNUSED 89 | # endif 90 | #endif /* PLCR_PRIVATE */ 91 | 92 | #endif /* PLCRASH_CONSTANTS_H */ 93 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportApplicationInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportApplicationInfo : NSObject { 32 | @private 33 | /** Application identifier */ 34 | NSString *_applicationIdentifier; 35 | 36 | /** Application version */ 37 | NSString *_applicationVersion; 38 | 39 | /** Application marketing version */ 40 | NSString *_applicationMarketingVersion; 41 | } 42 | 43 | - (id) initWithApplicationIdentifier: (NSString *) applicationIdentifier 44 | applicationVersion: (NSString *) applicationVersion 45 | applicationMarketingVersion: (NSString *) applicationMarketingVersion; 46 | 47 | /** 48 | * The application identifier. This is usually the application's CFBundleIdentifier value. 49 | */ 50 | @property(nonatomic, readonly) NSString *applicationIdentifier; 51 | 52 | /** 53 | * The application version. This is usually the application's CFBundleVersion value. 54 | */ 55 | @property(nonatomic, readonly) NSString *applicationVersion; 56 | 57 | /** 58 | * The application marketing version. This is usually the application's CFBundleShortVersionString value if available. May be nil. 59 | */ 60 | @property(nonatomic, readonly) NSString *applicationMarketingVersion; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportBinaryImageInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportProcessorInfo.h" 31 | 32 | @interface PLCrashReportBinaryImageInfo : NSObject { 33 | @private 34 | /** Code type */ 35 | PLCrashReportProcessorInfo *_processorInfo; 36 | 37 | /** Base image address */ 38 | uint64_t _baseAddress; 39 | 40 | /** Image segment size */ 41 | uint64_t _imageSize; 42 | 43 | /** Name of binary image */ 44 | NSString *_imageName; 45 | 46 | /** If the UUID is available */ 47 | BOOL _hasImageUUID; 48 | 49 | /** 128-bit object UUID. May be nil. */ 50 | NSString *_imageUUID; 51 | } 52 | 53 | - (id) initWithCodeType: (PLCrashReportProcessorInfo *) processorInfo 54 | baseAddress: (uint64_t) baseAddress 55 | size: (uint64_t) imageSize 56 | name: (NSString *) imageName 57 | uuid: (NSData *) uuid; 58 | 59 | /** 60 | * Image code type, or nil if unavailable. 61 | */ 62 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *codeType; 63 | 64 | /** 65 | * Image base address. 66 | */ 67 | @property(nonatomic, readonly) uint64_t imageBaseAddress; 68 | 69 | /** 70 | * Segment size. 71 | */ 72 | @property(nonatomic, readonly) uint64_t imageSize; 73 | 74 | /** 75 | * Image name (absolute path) 76 | */ 77 | @property(nonatomic, readonly) NSString *imageName; 78 | 79 | 80 | /** 81 | * YES if this image has an associated UUID. 82 | */ 83 | @property(nonatomic, readonly) BOOL hasImageUUID; 84 | 85 | /** 86 | * 128-bit object UUID (matches Mach-O DWARF dSYM files). May be nil if unavailable. 87 | */ 88 | @property(nonatomic, readonly) NSString *imageUUID; 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportExceptionInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportThreadInfo.h" 31 | 32 | 33 | @interface PLCrashReportExceptionInfo : NSObject { 34 | @private 35 | /** Name */ 36 | NSString *_name; 37 | 38 | /** Reason */ 39 | NSString *_reason; 40 | 41 | /** Ordered list of PLCrashReportStackFrame instances, or nil if unavailable. */ 42 | NSArray *_stackFrames; 43 | } 44 | 45 | - (id) initWithExceptionName: (NSString *) name reason: (NSString *) reason; 46 | 47 | - (id) initWithExceptionName: (NSString *) name 48 | reason: (NSString *) reason 49 | stackFrames: (NSArray *) stackFrames; 50 | 51 | /** 52 | * The exception name. 53 | */ 54 | @property(nonatomic, readonly) NSString *exceptionName; 55 | 56 | /** 57 | * The exception reason. 58 | */ 59 | @property(nonatomic, readonly) NSString *exceptionReason; 60 | 61 | /* The exception's original call stack, as an array of PLCrashReportStackFrameInfo instances, or nil if unavailable. 62 | * This may be preserved across rethrow of an exception, and can be used to determine the original call stack. */ 63 | @property(nonatomic, readonly) NSArray *stackFrames; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportFormatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReport.h" 32 | 33 | /** 34 | * A crash report formatter accepts a PLCrashReport instance, formats it according to implementation-specified rules, 35 | * (such as implementing text output support), and returns the result. 36 | */ 37 | @protocol PLCrashReportFormatter 38 | 39 | /** 40 | * Format the provided @a report. 41 | * 42 | * @param report Report to be formatted. 43 | * @param outError A pointer to an NSError object variable. If an error occurs, this pointer will contain an error 44 | * object indicating why the pending crash report could not be formatted. If no error occurs, this parameter will 45 | * be left unmodified. You may specify nil for this parameter, and no error information will be provided. 46 | * 47 | * @return Returns the formatted report data on success, or nil on failure. 48 | */ 49 | - (NSData *) formatReport: (PLCrashReport *) report error: (NSError **) outError; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportMachExceptionInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportMachExceptionInfo : NSObject { 32 | @private 33 | /** The Mach exception type. */ 34 | uint64_t _type; 35 | 36 | /** The Mach exception codes, represented as an ordered array of NSNumber instances. */ 37 | NSArray *_codes; 38 | } 39 | 40 | - (id) initWithType: (uint64_t) type codes: (NSArray *) codes; 41 | 42 | /** The Mach exception type. */ 43 | @property(nonatomic, readonly) uint64_t type; 44 | 45 | /** The Mach exception codes, represented as an ordered array of 64-bit unsigned NSNumber instances. */ 46 | @property(nonatomic, readonly) NSArray *codes; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportMachineInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportProcessorInfo.h" 32 | 33 | @interface PLCrashReportMachineInfo : NSObject { 34 | @private 35 | /** The hardware model name (eg, MacBookPro6,1). This may be unavailable, and this property will be nil. */ 36 | NSString *_modelName; 37 | 38 | /** The processor type. */ 39 | PLCrashReportProcessorInfo *_processorInfo; 40 | 41 | /* The number of actual physical processor cores. */ 42 | NSUInteger _processorCount; 43 | 44 | /* The number of logical processors. */ 45 | NSUInteger _logicalProcessorCount; 46 | } 47 | 48 | - (id) initWithModelName: (NSString *) modelName 49 | processorInfo: (PLCrashReportProcessorInfo *) processorInfo 50 | processorCount: (NSUInteger) processorCount 51 | logicalProcessorCount: (NSUInteger) logicalProcessorCount; 52 | 53 | /** The hardware model name (eg, MacBookPro6,1). This may be unavailable, and this property will be nil. */ 54 | @property(nonatomic, readonly) NSString *modelName; 55 | 56 | /** The processor type. This will be unavailable in reports generated prior to PLCrashReporter 1.2, in which case this property will be nil. */ 57 | @property(nonatomic, readonly) PLCrashReportProcessorInfo *processorInfo; 58 | 59 | /* 60 | * The number of actual physical processor cores. Note that the number of active processors may be managed by the 61 | * operating system's power management system, and this value may not reflect the number of active 62 | * processors at the time of the crash. 63 | */ 64 | @property(nonatomic, readonly) NSUInteger processorCount; 65 | 66 | /* 67 | * The number of logical processors. Note that the number of active processors may be managed by the 68 | * operating system's power management system, and this value may not reflect the number of active 69 | * processors at the time of the crash. 70 | */ 71 | @property(nonatomic, readonly) NSUInteger logicalProcessorCount; 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportProcessInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Damian Morris 3 | * 4 | * Copyright (c) 2010 MOSO Corporation, Pty Ltd. 5 | * Copyright (c) 2010-2013 Plausible Labs Cooperative, Inc. 6 | * 7 | * All rights reserved. 8 | * 9 | * Permission is hereby granted, free of charge, to any person 10 | * obtaining a copy of this software and associated documentation 11 | * files (the "Software"), to deal in the Software without 12 | * restriction, including without limitation the rights to use, 13 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the 15 | * Software is furnished to do so, subject to the following 16 | * conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be 19 | * included in all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | * OTHER DEALINGS IN THE SOFTWARE. 29 | */ 30 | 31 | #import 32 | 33 | @interface PLCrashReportProcessInfo : NSObject { 34 | @private 35 | /** Process name, or nil if unavailable. */ 36 | NSString *_processName; 37 | 38 | /** Process ID */ 39 | NSUInteger _processID; 40 | 41 | /** Process path */ 42 | NSString* _processPath; 43 | 44 | /** Date and time that the crashing process was started. This may be unavailable, and this property 45 | * will be nil. */ 46 | NSDate *_processStartTime; 47 | 48 | /** Parent process name, or nil if unavailable. */ 49 | NSString *_parentProcessName; 50 | 51 | /** Parent process ID */ 52 | NSUInteger _parentProcessID; 53 | 54 | /** If false, the process is being run via process-level CPU emulation (such as Rosetta). */ 55 | BOOL _native; 56 | } 57 | 58 | - (id) initWithProcessName: (NSString *) processName 59 | processID: (NSUInteger) processID 60 | processPath: (NSString *) processPath 61 | processStartTime: (NSDate *) processStartTime 62 | parentProcessName: (NSString *) parentProcessName 63 | parentProcessID: (NSUInteger) parentProcessID 64 | native: (BOOL) native; 65 | 66 | /** 67 | * The process name. This value may not be included in the crash report, in which case this property 68 | * will be nil. 69 | */ 70 | @property(nonatomic, readonly) NSString *processName; 71 | 72 | /** 73 | * The process ID. 74 | */ 75 | @property(nonatomic, readonly) NSUInteger processID; 76 | 77 | /** 78 | * The path to the process executable. This value may not be included in the crash report, in which case this property 79 | * will be nil. 80 | */ 81 | @property(nonatomic, readonly) NSString *processPath; 82 | 83 | /** 84 | * Date and time that the crashing process was started. This value may not be included in the crash report, in which case this property 85 | * will be nil. 86 | */ 87 | @property(nonatomic, readonly) NSDate *processStartTime; 88 | 89 | /** 90 | * The parent process name. This value may not be included in the crash report, in which case this property 91 | * will be nil. 92 | */ 93 | @property(nonatomic, readonly) NSString *parentProcessName; 94 | 95 | /** 96 | * The parent process ID. 97 | */ 98 | @property(nonatomic, readonly) NSUInteger parentProcessID; 99 | 100 | /** The process' native execution status. If false, the process is being run via process-level CPU emulation (such as Rosetta). */ 101 | @property(nonatomic, readonly) BOOL native; 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportProcessorInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import 31 | 32 | /** 33 | * @ingroup constants 34 | * 35 | * The type encodings supported for CPU types and subtypes. Currently only Apple 36 | * Mach-O defined encodings are supported. 37 | * 38 | * @internal 39 | * These enum values match the protobuf values. Keep them synchronized. 40 | */ 41 | typedef enum { 42 | /** Unknown cpu type encoding. */ 43 | PLCrashReportProcessorTypeEncodingUnknown = 0, 44 | 45 | /** Apple Mach-defined processor types. */ 46 | PLCrashReportProcessorTypeEncodingMach = 1 47 | } PLCrashReportProcessorTypeEncoding; 48 | 49 | @interface PLCrashReportProcessorInfo : NSObject { 50 | @private 51 | /** Type encoding */ 52 | PLCrashReportProcessorTypeEncoding _typeEncoding; 53 | 54 | /** CPU type */ 55 | uint64_t _type; 56 | 57 | /** CPU subtype */ 58 | uint64_t _subtype; 59 | } 60 | 61 | - (id) initWithTypeEncoding: (PLCrashReportProcessorTypeEncoding) typeEncoding 62 | type: (uint64_t) type 63 | subtype: (uint64_t) subtype; 64 | 65 | /** The CPU type encoding. */ 66 | @property(nonatomic, readonly) PLCrashReportProcessorTypeEncoding typeEncoding; 67 | 68 | /** The CPU type. */ 69 | @property(nonatomic, readonly) uint64_t type; 70 | 71 | /** The CPU subtype. */ 72 | @property(nonatomic, readonly) uint64_t subtype; 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportRegisterInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportRegisterInfo : NSObject { 32 | @private 33 | /** Register name */ 34 | NSString *_registerName; 35 | 36 | /** Register value */ 37 | uint64_t _registerValue; 38 | } 39 | 40 | - (id) initWithRegisterName: (NSString *) registerName registerValue: (uint64_t) registerValue; 41 | 42 | /** 43 | * Register name. 44 | */ 45 | @property(nonatomic, readonly) NSString *registerName; 46 | 47 | /** 48 | * Register value. 49 | */ 50 | @property(nonatomic, readonly) uint64_t registerValue; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportSignalInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportSignalInfo : NSObject { 32 | @private 33 | /** Signal name */ 34 | NSString *_name; 35 | 36 | /** Signal code */ 37 | NSString *_code; 38 | 39 | /** Fauling instruction or address */ 40 | uint64_t _address; 41 | } 42 | 43 | - (id) initWithSignalName: (NSString *) name code: (NSString *) code address: (uint64_t) address; 44 | 45 | /** 46 | * The signal name. 47 | */ 48 | @property(nonatomic, readonly) NSString *name; 49 | 50 | /** 51 | * The signal code. 52 | */ 53 | @property(nonatomic, readonly) NSString *code; 54 | 55 | /** 56 | * The faulting instruction or address. 57 | */ 58 | @property(nonatomic, readonly) uint64_t address; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportStackFrameInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | #import "PLCrashReportSymbolInfo.h" 31 | 32 | @interface PLCrashReportStackFrameInfo : NSObject { 33 | @private 34 | /** Frame instruction pointer. */ 35 | uint64_t _instructionPointer; 36 | 37 | /** Symbol information, if available. Otherwise, will be nil. */ 38 | PLCrashReportSymbolInfo *_symbolInfo; 39 | } 40 | 41 | - (id) initWithInstructionPointer: (uint64_t) instructionPointer symbolInfo: (PLCrashReportSymbolInfo *) symbolInfo; 42 | 43 | /** 44 | * Frame's instruction pointer. 45 | */ 46 | @property(nonatomic, readonly) uint64_t instructionPointer; 47 | 48 | /** Symbol information for this frame. 49 | * This may be unavailable, and this property will be nil. */ 50 | @property(nonatomic, readonly) PLCrashReportSymbolInfo *symbolInfo; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportSymbolInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2012-2013 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | @interface PLCrashReportSymbolInfo : NSObject { 32 | @private 33 | /** The symbol name. */ 34 | NSString *_symbolName; 35 | 36 | /** The symbol start address. */ 37 | uint64_t _startAddress; 38 | 39 | /** The symbol end address, if explicitly defined. Will be 0 if unknown. */ 40 | uint64_t _endAddress; 41 | } 42 | 43 | - (id) initWithSymbolName: (NSString *) symbolName 44 | startAddress: (uint64_t) startAddress 45 | endAddress: (uint64_t) endAddress; 46 | 47 | /** The symbol name. */ 48 | @property(nonatomic, readonly) NSString *symbolName; 49 | 50 | /** The symbol start address. */ 51 | @property(nonatomic, readonly) uint64_t startAddress; 52 | 53 | /* The symbol end address, if explicitly defined. This will only be included if the end address is 54 | * explicitly defined (eg, by DWARF debugging information), will not be derived by best-guess 55 | * heuristics. 56 | * 57 | * If unknown, the address will be 0. 58 | */ 59 | @property(nonatomic, readonly) uint64_t endAddress; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportTextFormatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authors: 3 | * Landon Fuller 4 | * Damian Morris 5 | * 6 | * Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. 7 | * Copyright (c) 2010 MOSO Corporation, Pty Ltd. 8 | * All rights reserved. 9 | * 10 | * Permission is hereby granted, free of charge, to any person 11 | * obtaining a copy of this software and associated documentation 12 | * files (the "Software"), to deal in the Software without 13 | * restriction, including without limitation the rights to use, 14 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | * copies of the Software, and to permit persons to whom the 16 | * Software is furnished to do so, subject to the following 17 | * conditions: 18 | * 19 | * The above copyright notice and this permission notice shall be 20 | * included in all copies or substantial portions of the Software. 21 | * 22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 24 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 26 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 27 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 29 | * OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | 32 | 33 | #import 34 | 35 | #import "PLCrashReportFormatter.h" 36 | 37 | /** 38 | * Supported text output formats. 39 | * 40 | * @ingroup enums 41 | */ 42 | typedef enum { 43 | /** An iOS-compatible crash log text format. Compatible with the crash logs generated by the device and available 44 | * through iTunes Connect. */ 45 | PLCrashReportTextFormatiOS = 0 46 | } PLCrashReportTextFormat; 47 | 48 | 49 | @interface PLCrashReportTextFormatter : NSObject { 50 | @private 51 | /** Text output format. */ 52 | PLCrashReportTextFormat _textFormat; 53 | 54 | /** Encoding to use for string output. */ 55 | NSStringEncoding _stringEncoding; 56 | } 57 | 58 | + (NSString *) stringValueForCrashReport: (PLCrashReport *) report withTextFormat: (PLCrashReportTextFormat) textFormat; 59 | 60 | - (id) initWithTextFormat: (PLCrashReportTextFormat) textFormat stringEncoding: (NSStringEncoding) stringEncoding; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/Headers/PLCrashReportThreadInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Landon Fuller 3 | * 4 | * Copyright (c) 2008-2009 Plausible Labs Cooperative, Inc. 5 | * All rights reserved. 6 | * 7 | * Permission is hereby granted, free of charge, to any person 8 | * obtaining a copy of this software and associated documentation 9 | * files (the "Software"), to deal in the Software without 10 | * restriction, including without limitation the rights to use, 11 | * copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the 13 | * Software is furnished to do so, subject to the following 14 | * conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | * OTHER DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | #import 30 | 31 | #import "PLCrashReportStackFrameInfo.h" 32 | #import "PLCrashReportRegisterInfo.h" 33 | 34 | @interface PLCrashReportThreadInfo : NSObject { 35 | @private 36 | /** The thread number. Should be unique within a given crash log. */ 37 | NSInteger _threadNumber; 38 | 39 | /** Ordered list of PLCrashReportStackFrame instances */ 40 | NSArray *_stackFrames; 41 | 42 | /** YES if this thread crashed. */ 43 | BOOL _crashed; 44 | 45 | /** List of PLCrashReportRegister instances. Will be empty if _crashed is NO. */ 46 | NSArray *_registers; 47 | } 48 | 49 | - (id) initWithThreadNumber: (NSInteger) threadNumber 50 | stackFrames: (NSArray *) stackFrames 51 | crashed: (BOOL) crashed 52 | registers: (NSArray *) registers; 53 | 54 | /** 55 | * Application thread number. 56 | */ 57 | @property(nonatomic, readonly) NSInteger threadNumber; 58 | 59 | /** 60 | * Thread backtrace. Provides an array of PLCrashReportStackFrameInfo instances. 61 | * The array is ordered, last callee to first. 62 | */ 63 | @property(nonatomic, readonly) NSArray *stackFrames; 64 | 65 | /** 66 | * If this thread crashed, set to YES. 67 | */ 68 | @property(nonatomic, readonly) BOOL crashed; 69 | 70 | /** 71 | * State of the general purpose and related registers, as a list of 72 | * PLCrashReportRegister instances. If this thead did not crash (crashed returns NO), 73 | * this list will be empty. 74 | */ 75 | @property(nonatomic, readonly) NSArray *registers; 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Vendor/CrashReporter/libCrashReporter-MacOSX-Static.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitstadium/HockeySDK-Mac/b9d70d9c490e7969c73cddd798ab22c7305fb1a9/Vendor/CrashReporter/libCrashReporter-MacOSX-Static.a --------------------------------------------------------------------------------