From 42cdcaf574be8e81eb3e8b376d3c0e10242af3e4 Mon Sep 17 00:00:00 2001 From: Ben Gourley Date: Fri, 7 Feb 2020 16:38:12 +0000 Subject: [PATCH] chore: Prepare release --- CHANGELOG.md | 34 +++++++- android/build.gradle | 2 +- cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.h | 26 +++--- cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.m | 21 ++++- .../bugsnag-cocoa/Source/BugsnagBreadcrumb.m | 4 +- .../Source/BugsnagConfiguration.h | 26 +++++- .../Source/BugsnagConfiguration.m | 44 ++++++++--- .../bugsnag-cocoa/Source/BugsnagCrashReport.h | 3 +- .../bugsnag-cocoa/Source/BugsnagCrashReport.m | 79 ++++--------------- .../bugsnag-cocoa/Source/BugsnagCrashSentry.m | 2 +- .../bugsnag-cocoa/Source/BugsnagNotifier.m | 28 ++++--- .../bugsnag-cocoa/Source/BugsnagPlugin.h | 17 ++++ .../Source/BugsnagSessionTracker.h | 2 +- .../Source/BugsnagSessionTracker.m | 2 +- .../vendor/bugsnag-cocoa/Source/BugsnagSink.m | 35 +------- .../Source/KSCrash/Recording/BSG_KSCrashC.c | 51 +----------- .../Recording/Sentry/BSG_KSCrashSentry.c | 4 +- .../Recording/Sentry/BSG_KSCrashSentry.h | 4 +- .../Sentry/BSG_KSCrashSentry_CPPException.mm | 4 +- .../Sentry/BSG_KSCrashSentry_MachException.c | 4 +- .../Sentry/BSG_KSCrashSentry_NSException.m | 4 +- .../Sentry/BSG_KSCrashSentry_Signal.c | 14 +--- .../Recording/Sentry/BSG_KSCrashSentry_User.c | 6 +- .../iOS/Bugsnag.xcodeproj/project.pbxproj | 10 ++- .../vendor/bugsnag-cocoa/iOS/module.modulemap | 1 + 25 files changed, 197 insertions(+), 230 deletions(-) create mode 100644 cocoa/vendor/bugsnag-cocoa/Source/BugsnagPlugin.h diff --git a/CHANGELOG.md b/CHANGELOG.md index a2a698d5..5e3cf09a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,40 @@ Changelog ========= -## TBD +## 2.23.6 (2020-02-10) ### Bug fixes +* (iOS) Fix include for RCTVersion.h to work in custom Podfiles on all versions of React Native + [#443](https://github.com/bugsnag/bugsnag-react-native/pull/443) * Add missing argument to `BeforeSend` type definition [bugsnag-react-native#432](https://github.com/bugsnag/bugsnag-react-native/pull/432) +* (Android) Upgrade bugsnag-android to v4.22.3 + * Allow disabling previous signal handler invocation for Unity ANRs + [#743](https://github.com/bugsnag/bugsnag-android/pull/743) + * Avoid polling when detecting ANRs by invoking JNI from SIGQUIT handler + [#741](https://github.com/bugsnag/bugsnag-android/pull/741) +* (iOS) Upgrade bugsnag-cocoa to v5.23.0 + - This release removes support for reporting 'partial' or 'minimal' crash reports + where the crash report could not be entirely written (due to disk space or other + issues like the device battery dying). While sometimes the reports could point + in the right direction for debugging, they could also be confusing or not enough + information to pursue and close the issue successfully. + + - This release also renames a few configuration properties to align better with the + intended use and other Bugsnag libraries, so people who use more than one + platform can easily find related functionality in a different library. The old + names are deprecated but still supported until the next major release. + [#435](https://github.com/bugsnag/bugsnag-cocoa/pull/435) + + * `Bugsnag.setBreadcrumbCapacity()` is now `setMaxBreadcrumbs()` on the + `BugsnagConfiguration` class. In addition, the default number of breadcrumbs + saved has been raised to 25 and limited to no more than 100. + * `BugsnagConfiguration.autoNotify` is now named + `BugsnagConfiguration.autoDetectErrors` + * `BugsnagConfiguration.autoCaptureSessions` is now named + `BugsnagConfiguration.autoDetectSessions` + ## 2.23.5 (2020-01-13) @@ -15,8 +43,6 @@ Changelog * (iOS) Fix a packaging issue introduced in 2.23.3 which prevented apps using React Native 0.59 and below from building successfully [#441](https://github.com/bugsnag/bugsnag-react-native/pull/441) - - ## 2.23.4 (2020-01-06) ### Bug fixes @@ -27,7 +53,7 @@ Changelog * Catch throwables when invoking methods on system services [#623](https://github.com/bugsnag/bugsnag-android/pull/623) * Fix possible crash when recording reports and breadcrumbs containing values - using different text encodings or UTF-8 control characters, followed by a + using different text encodings or UTF-8 control characters, followed by a C/C++ crash. [#584](https://github.com/bugsnag/bugsnag-android/pull/584) * Fix crash when calling `NativeInterface.clearTab()` (from an integration diff --git a/android/build.gradle b/android/build.gradle index 0048bf5f..7fbac4ea 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,7 +36,7 @@ android { } dependencies { - api 'com.bugsnag:bugsnag-android:4.22.2' + api 'com.bugsnag:bugsnag-android:4.22.3' implementation 'com.facebook.react:react-native:+' androidTestImplementation 'junit:junit:4.12' diff --git a/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.h b/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.h index 78bb10d5..b2688526 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.h +++ b/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.h @@ -27,6 +27,7 @@ #import "BugsnagConfiguration.h" #import "BugsnagMetaData.h" +#import "BugsnagPlugin.h" static NSString *_Nonnull const BugsnagSeverityError = @"error"; static NSString *_Nonnull const BugsnagSeverityWarning = @"warning"; @@ -193,15 +194,6 @@ static NSString *_Nonnull const BugsnagSeverityInfo = @"info"; */ + (void)leaveBreadcrumbForNotificationName:(NSString *_Nonnull)notificationName; -/** - * Set the maximum number of breadcrumbs to keep and sent to Bugsnag. - * By default, we'll keep and send the 20 most recent breadcrumb log - * messages. - * - * @param capacity max number of breadcrumb log messages to send - */ -+ (void)setBreadcrumbCapacity:(NSUInteger)capacity; - /** * Clear any breadcrumbs that have been left so far. */ @@ -221,7 +213,7 @@ static NSString *_Nonnull const BugsnagSeverityInfo = @"info"; * By default, sessions are automatically started when the application enters the foreground. * If you wish to manually call startSession at * the appropriate time in your application instead, the default behaviour can be disabled via - * shouldAutoCaptureSessions. + * autoTrackSessions. * * Any errors which occur in an active session count towards your application's * stability score. You can prevent errors from counting towards your stability @@ -239,7 +231,7 @@ static NSString *_Nonnull const BugsnagSeverityInfo = @"info"; * When a session is stopped, errors will not count towards your application's * stability score. This can be advantageous if you do not wish these calculations to * include a certain type of error, for example, a crash in a background service. - * You should disable automatic session tracking via shouldAutoCaptureSessions if you call this method. + * You should disable automatic session tracking via autoTrackSessions if you call this method. * * A stopped session can be resumed by calling resumeSession, * which will make any subsequent errors count towards your application's @@ -255,7 +247,7 @@ static NSString *_Nonnull const BugsnagSeverityInfo = @"info"; * * If a session has already been resumed or started and has not been stopped, calling this * method will have no effect. You should disable automatic session tracking via - * shouldAutoCaptureSessions if you call this method. + * autoTrackSessions if you call this method. * * It's important to note that sessions are stored in memory for the lifetime of the * application process and are not persisted on disk. Therefore calling this method on app @@ -272,4 +264,14 @@ static NSString *_Nonnull const BugsnagSeverityInfo = @"info"; */ + (BOOL)resumeSession; +/** + * Set the maximum number of breadcrumbs to keep and sent to Bugsnag. + * By default, we'll keep and send the 20 most recent breadcrumb log + * messages. + * + * @param capacity max number of breadcrumb log messages to send + */ ++ (void)setBreadcrumbCapacity:(NSUInteger)capacity + __deprecated_msg("Use [BugsnagConfiguration setMaxBreadcrumbs:] instead"); + @end diff --git a/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.m b/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.m index a14f4ceb..6e62ca7f 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/Bugsnag.m @@ -29,12 +29,15 @@ #import "BugsnagLogger.h" #import "BugsnagNotifier.h" #import "BugsnagKeys.h" +#import "BugsnagPlugin.h" static BugsnagNotifier *bsg_g_bugsnag_notifier = NULL; +static NSMutableArray > *registeredPlugins; @interface Bugsnag () + (BugsnagNotifier *)notifier; + (BOOL)bugsnagStarted; ++ (void)registerPlugin:(id)plugin; @end @interface NSDictionary (BSGKSMerge) @@ -54,6 +57,7 @@ + (void)startBugsnagWithConfiguration:(BugsnagConfiguration *)configuration { if ([configuration hasValidApiKey]) { bsg_g_bugsnag_notifier = [[BugsnagNotifier alloc] initWithConfiguration:configuration]; + [self startPlugins]; [bsg_g_bugsnag_notifier start]; } else { bsg_log_err(@"Bugsnag not initialized - a valid API key must be supplied."); @@ -76,6 +80,21 @@ + (BugsnagNotifier *)notifier { return bsg_g_bugsnag_notifier; } ++ (void)registerPlugin:(id)plugin { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + registeredPlugins = [NSMutableArray new]; + }); + [registeredPlugins addObject:plugin]; +} + ++ (void)startPlugins { + for (id plugin in registeredPlugins) { + if (![plugin isStarted]) + [plugin start]; + } +} + + (BOOL)appDidCrashLastLaunch { if ([self bugsnagStarted]) { return [self.notifier appCrashedLastLaunch]; @@ -217,7 +236,7 @@ + (void)leaveBreadcrumbForNotificationName: + (void)setBreadcrumbCapacity:(NSUInteger)capacity { if ([self bugsnagStarted]) { - self.notifier.configuration.breadcrumbs.capacity = capacity; + [self.notifier.configuration setMaxBreadcrumbs:capacity]; } } diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagBreadcrumb.m b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagBreadcrumb.m index 75fa15f7..c524d568 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagBreadcrumb.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagBreadcrumb.m @@ -178,7 +178,7 @@ + (instancetype)breadcrumbWithBlock:(BSGBreadcrumbConfiguration)block { @implementation BugsnagBreadcrumbs -NSUInteger BreadcrumbsDefaultCapacity = 20; +NSUInteger BreadcrumbsDefaultCapacity = 25; - (instancetype)init { static NSString *const BSGBreadcrumbCacheFileName = @"bugsnag_breadcrumbs.json"; @@ -263,7 +263,7 @@ - (void)setCapacity:(NSUInteger)capacity { } [self resizeToFitCapacity:capacity]; [self willChangeValueForKey:NSStringFromSelector(@selector(capacity))]; - _capacity = capacity; + _capacity = MIN(100, capacity); [self didChangeValueForKey:NSStringFromSelector(@selector(capacity))]; } } diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.h b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.h index 367e83b1..9f8d7d63 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.h +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.h @@ -147,16 +147,16 @@ NSArray *beforeSendSessionBlocks; (const BSG_KSCrashReportWriter *_Nonnull writer); /** - * YES if uncaught exceptions should be reported automatically + * YES if uncaught exceptions and other crashes should be reported automatically */ -@property BOOL autoNotify; +@property BOOL autoDetectErrors; /** * Determines whether app sessions should be tracked automatically. By default this value is true. * If this value is updated after +[Bugsnag start] is called, only subsequent automatic sessions * will be captured. */ -@property BOOL shouldAutoCaptureSessions; +@property BOOL autoTrackSessions; /** * Whether the app should report out of memory events which terminate the app @@ -245,8 +245,28 @@ __deprecated_msg("This detection option is unreliable and should no longer be us */ - (BOOL)shouldSendReports; +/** + * The maximum number of breadcrumbs to keep and sent to Bugsnag. + * By default, we'll keep and send the 25 most recent breadcrumb log + * messages. + */ +@property NSUInteger maxBreadcrumbs; + - (void)addBeforeNotifyHook:(BugsnagBeforeNotifyHook _Nonnull)hook __deprecated_msg("Use addBeforeSendBlock: instead."); + +/** + * Determines whether app sessions should be tracked automatically. By default this value is true. + * If this value is updated after +[Bugsnag start] is called, only subsequent automatic sessions + * will be captured. + */ +@property BOOL shouldAutoCaptureSessions __deprecated_msg("Use autoTrackSessions instead"); + +/** + * YES if uncaught exceptions should be reported automatically + */ +@property BOOL autoNotify __deprecated_msg("Use autoDetectErrors instead"); + /** * Hooks for processing raw report data before it is sent to Bugsnag */ diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.m b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.m index 7b14b683..ca1f5c2e 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.m @@ -59,7 +59,7 @@ - (id)init { _config = [[BugsnagMetaData alloc] init]; _apiKey = @""; _sessionURL = [NSURL URLWithString:@"https://sessions.bugsnag.com"]; - _autoNotify = YES; + _autoDetectErrors = YES; _notifyURL = [NSURL URLWithString:BSGDefaultNotifyUrl]; _beforeNotifyHooks = [NSMutableArray new]; _beforeSendBlocks = [NSMutableArray new]; @@ -67,7 +67,7 @@ - (id)init { _notifyReleaseStages = nil; _breadcrumbs = [BugsnagBreadcrumbs new]; _automaticallyCollectBreadcrumbs = YES; - _shouldAutoCaptureSessions = YES; + _autoTrackSessions = YES; #if !DEBUG _reportOOMs = YES; #endif @@ -142,20 +142,28 @@ - (void)setReleaseStage:(NSString *)newReleaseStage { } } -@synthesize autoNotify = _autoNotify; +@synthesize autoDetectErrors = _autoDetectErrors; -- (BOOL)autoNotify { - return _autoNotify; +- (BOOL)autoDetectErrors { + return _autoDetectErrors; } -- (void)setAutoNotify:(BOOL)shouldAutoNotify { - if (shouldAutoNotify == _autoNotify) { +- (void)setAutoDetectErrors:(BOOL)autoDetectErrors { + if (autoDetectErrors == _autoDetectErrors) { return; } - [self willChangeValueForKey:NSStringFromSelector(@selector(autoNotify))]; - _autoNotify = shouldAutoNotify; + [self willChangeValueForKey:NSStringFromSelector(@selector(autoDetectErrors))]; + _autoDetectErrors = autoDetectErrors; [[Bugsnag notifier] updateCrashDetectionSettings]; - [self didChangeValueForKey:NSStringFromSelector(@selector(autoNotify))]; + [self didChangeValueForKey:NSStringFromSelector(@selector(autoDetectErrors))]; +} + +- (BOOL)autoNotify { + return self.autoDetectErrors; +} + +- (void)setAutoNotify:(BOOL)autoNotify { + self.autoDetectErrors = autoNotify; } @synthesize notifyReleaseStages = _notifyReleaseStages; @@ -177,6 +185,14 @@ - (void)setNotifyReleaseStages:(NSArray *)newNotifyReleaseStages; } } +- (void)setShouldAutoCaptureSessions:(BOOL)shouldAutoCaptureSessions { + self.autoTrackSessions = shouldAutoCaptureSessions; +} + +- (BOOL)shouldAutoCaptureSessions { + return self.autoTrackSessions; +} + @synthesize automaticallyCollectBreadcrumbs = _automaticallyCollectBreadcrumbs; - (BOOL)automaticallyCollectBreadcrumbs { @@ -282,4 +298,12 @@ - (BOOL)hasValidApiKey { return [_apiKey length] > 0; } +- (NSUInteger)maxBreadcrumbs { + return self.breadcrumbs.capacity; +} + +- (void)setMaxBreadcrumbs:(NSUInteger)capacity { + self.breadcrumbs.capacity = capacity; +} + @end diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.h b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.h index f39c822d..71823f99 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.h +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.h @@ -49,7 +49,8 @@ NSString *_Nonnull BSGFormatSeverity(BSGSeverity severity); * @return a Bugsnag crash report */ - (instancetype _Nonnull)initWithKSReport:(NSDictionary *_Nonnull)report - fileMetadata:(NSString *_Nonnull)metadata; + fileMetadata:(NSString *_Nonnull)metadata + __deprecated_msg("Use initWithKSReport: instead."); /** * Create a new crash report from a JSON crash report generated by diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.m b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.m index 9b49319d..37aff6b7 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashReport.m @@ -69,8 +69,7 @@ } NSString *_Nonnull BSGParseErrorClass(NSDictionary *error, - NSString *errorType, - NSString *fallbackValue) { + NSString *errorType) { NSString *errorClass; if ([errorType isEqualToString:BSGKeyCppException]) { @@ -86,7 +85,7 @@ } if (!errorClass) { // use a default value - errorClass = fallbackValue.length > 0 ? fallbackValue : @"Exception"; + errorClass = @"Exception"; } return errorClass; } @@ -192,13 +191,6 @@ + (instancetype)errorDataFromThreads:(NSArray *)threads; - (instancetype)initWithClass:(NSString *_Nonnull)errorClass message:(NSString *_Nonnull)errorMessage NS_DESIGNATED_INITIALIZER; @end -@interface FallbackReportData : NSObject -@property (nonatomic, strong) NSString *errorClass; -@property (nonatomic, getter=isUnhandled) BOOL unhandled; -@property (nonatomic) BSGSeverity severity; -- (instancetype)initWithMetadata:(NSString *)metadata; -@end - @interface BugsnagCrashReport () /** @@ -232,17 +224,21 @@ @interface BugsnagCrashReport () @implementation BugsnagCrashReport -- (instancetype)initWithKSReport:(NSDictionary *)report { - return [self initWithKSReport:report fileMetadata:@""]; -} - - (instancetype)initWithKSReport:(NSDictionary *)report fileMetadata:(NSString *)metadata { + return [self initWithKSReport:report]; +} + +- (instancetype)initWithKSReport:(NSDictionary *)report { + if (report.count == 0) { + return nil; // report is empty + } + if (self = [super init]) { _error = [report valueForKeyPath:@"crash.error"]; _errorType = _error[BSGKeyType]; if ([[report valueForKeyPath:@"user.state.didOOM"] boolValue]) { - _errorClass = BSGParseErrorClass(_error, _errorType, nil); + _errorClass = BSGParseErrorClass(_error, _errorType); _errorMessage = BSGParseErrorMessage(report, _error, _errorType); _breadcrumbs = [report valueForKeyPath:@"user.state.oom.breadcrumbs"]; _app = [report valueForKeyPath:@"user.state.oom.app"]; @@ -260,17 +256,15 @@ - (instancetype)initWithKSReport:(NSDictionary *)report } } } else { - FallbackReportData *fallback = [[FallbackReportData alloc] initWithMetadata:metadata]; _notifyReleaseStages = BSGLoadConfigValue(report, @"notifyReleaseStages"); _releaseStage = BSGParseReleaseStage(report); - _incomplete = report.count == 0; _threads = [report valueForKeyPath:@"crash.threads"]; RegisterErrorData *data = [RegisterErrorData errorDataFromThreads:_threads]; if (data) { - _errorClass = data.errorClass ?: fallback.errorClass; + _errorClass = data.errorClass ; _errorMessage = data.errorMessage; } else { - _errorClass = BSGParseErrorClass(_error, _errorType, fallback.errorClass); + _errorClass = BSGParseErrorClass(_error, _errorType); _errorMessage = BSGParseErrorMessage(report, _error, _errorType); } _binaryImages = report[@"binary_images"]; @@ -302,7 +296,7 @@ - (instancetype)initWithKSReport:(NSDictionary *)report // only makes sense to use serialised value for handled exceptions _depth = [[report valueForKeyPath:@"user.depth"] unsignedIntegerValue]; - } else if (_errorType != nil) { // the event was unhandled. + } else { // the event was unhandled. BOOL isSignal = [BSGKeySignal isEqualToString:_errorType]; SeverityReasonType severityReason = isSignal ? Signal : UnhandledException; @@ -311,11 +305,6 @@ - (instancetype)initWithKSReport:(NSDictionary *)report severity:BSGSeverityError attrValue:_errorClass]; _depth = 0; - } else { // Incomplete report - SeverityReasonType severityReason = [fallback isUnhandled] ? UnhandledException : HandledError; - _handledState = [BugsnagHandledState handledStateWithSeverityReason:severityReason - severity:fallback.severity - attrValue:nil]; } _severity = _handledState.currentSeverity; @@ -528,10 +517,6 @@ - (NSDictionary *)toJson { BSGDictSetSafeObject(event, [self breadcrumbs], BSGKeyBreadcrumbs); BSGDictSetSafeObject(event, metaData, BSGKeyMetaData); - if ([self isIncomplete]) { - BSGDictSetSafeObject(event, @YES, BSGKeyIncomplete); - } - NSDictionary *device = BSGDictMerge(self.device, self.deviceState); BSGDictSetSafeObject(event, device, BSGKeyDevice); @@ -669,42 +654,6 @@ - (NSString *_Nullable)enhancedErrorMessageForThread:(NSDictionary *_Nullable)th @end -@implementation FallbackReportData - -- (instancetype)initWithMetadata:(NSString *)metadata { - if (self = [super init]) { - NSString *separator = @"-"; - NSString *location = metadata; - NSRange range = [location rangeOfString:separator options:NSBackwardsSearch]; - if (range.location != NSNotFound) { - _errorClass = [location substringFromIndex:range.location + 1]; - location = [location substringToIndex:range.location]; - } - range = [location rangeOfString:separator options:NSBackwardsSearch]; - if (range.location != NSNotFound) { - NSString *value = [location substringFromIndex:range.location + 1]; - _unhandled = ![value isEqualToString:@"h"]; - location = [location substringToIndex:range.location + 1]; - } else { - _unhandled = YES; - } - range = [location rangeOfString:separator options:NSBackwardsSearch]; - if (range.location != NSNotFound) { - NSString *value = [location substringFromIndex:range.location]; - if ([value isEqualToString:@"w"]) { - _severity = BSGSeverityWarning; - } else if ([value isEqualToString:@"i"]) { - _severity = BSGSeverityInfo; - } else { - _severity = BSGSeverityError; - } - } - } - return self; -} - -@end - @implementation RegisterErrorData + (instancetype)errorDataFromThreads:(NSArray *)threads { for (NSDictionary *thread in threads) { diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashSentry.m b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashSentry.m index 6ba7d866..d917d679 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashSentry.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagCrashSentry.m @@ -29,7 +29,7 @@ - (void)install:(BugsnagConfiguration *)config [BSG_KSCrash sharedInstance].onCrash = onCrash; [BSG_KSCrash sharedInstance].maxStoredReports = BSG_MAX_STORED_REPORTS; - if (!config.autoNotify) { + if (!config.autoDetectErrors) { bsg_kscrash_setHandlingCrashTypes(BSG_KSCrashTypeUserReported); } if (![[BSG_KSCrash sharedInstance] install]) { diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagNotifier.m b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagNotifier.m index bfed732c..af1c28aa 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagNotifier.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagNotifier.m @@ -47,7 +47,7 @@ #import #endif -NSString *const NOTIFIER_VERSION = @"5.22.10"; +NSString *const NOTIFIER_VERSION = @"5.23.0"; NSString *const NOTIFIER_URL = @"https://github.com/bugsnag/bugsnag-cocoa"; NSString *const BSTabCrash = @"crash"; NSString *const BSAttributeDepth = @"depth"; @@ -218,12 +218,23 @@ - (id)initWithConfiguration:(BugsnagConfiguration *)initConfiguration { if ((self = [super init])) { self.configuration = initConfiguration; self.state = [[BugsnagMetaData alloc] init]; + NSString *notifierName = +#if TARGET_OS_TV + @"tvOS Bugsnag Notifier"; +#elif TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE + @"iOS Bugsnag Notifier"; +#elif TARGET_OS_MAC + @"OSX Bugsnag Notifier"; +#else + @"Bugsnag Objective-C"; +#endif self.details = [@{ - BSGKeyName : @"Bugsnag Objective-C", + BSGKeyName : notifierName, BSGKeyVersion : NOTIFIER_VERSION, BSGKeyUrl : NOTIFIER_URL } mutableCopy]; + NSString *cacheDir = [NSSearchPathForDirectoriesInDomains( NSCachesDirectory, NSUserDomainMask, YES) firstObject]; if (cacheDir) { @@ -340,12 +351,9 @@ - (void)start { [self watchLifecycleEvents:center]; #if TARGET_OS_TV - [self.details setValue:@"tvOS Bugsnag Notifier" forKey:BSGKeyName]; [self addTerminationObserver:UIApplicationWillTerminateNotification]; #elif TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE - [self.details setValue:@"iOS Bugsnag Notifier" forKey:BSGKeyName]; - [center addObserver:self selector:@selector(batteryChanged:) name:UIDeviceBatteryStateDidChangeNotification @@ -374,8 +382,6 @@ - (void)start { [self addTerminationObserver:UIApplicationWillTerminateNotification]; #elif TARGET_OS_MAC - [self.details setValue:@"OSX Bugsnag Notifier" forKey:BSGKeyName]; - [center addObserver:self selector:@selector(willEnterForeground:) name:NSApplicationDidBecomeActiveNotification @@ -390,8 +396,8 @@ - (void)start { #endif _started = YES; - // autoNotify disables all unhandled event reporting - BOOL configuredToReportOOMs = self.configuration.reportOOMs && self.configuration.autoNotify; + // autoDetectErrors disables all unhandled event reporting + BOOL configuredToReportOOMs = self.configuration.reportOOMs && self.configuration.autoDetectErrors; // Disable if a debugger is enabled, since the development cycle of starting // and restarting an app is also an uncatchable kill BOOL noDebuggerEnabled = !bsg_ksmachisBeingTraced(); @@ -806,7 +812,7 @@ - (void)lowMemoryWarning:(NSNotification *)notif { #endif - (void)updateCrashDetectionSettings { - if (self.configuration.autoNotify) { + if (self.configuration.autoDetectErrors) { // Enable all crash detection bsg_kscrash_setHandlingCrashTypes(BSG_KSCrashTypeAll); if (self.configuration.reportOOMs) { @@ -815,7 +821,7 @@ - (void)updateCrashDetectionSettings { } else { // Only enable support for notify()-based reports bsg_kscrash_setHandlingCrashTypes(BSG_KSCrashTypeUserReported); - // autoNotify gates all unhandled report detection + // autoDetectErrors gates all unhandled report detection [self.oomWatchdog disable]; } } diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagPlugin.h b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagPlugin.h new file mode 100644 index 00000000..c9b8d8ab --- /dev/null +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagPlugin.h @@ -0,0 +1,17 @@ +#ifndef BugsnagPlugin_h +#define BugsnagPlugin_h + +/** + * Internal interface for adding custom behavior + */ +@protocol BugsnagPlugin + +@required + +- (BOOL)isStarted; + +- (void)start; + +@end + +#endif /* BugsnagPlugin_h */ diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.h b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.h index 4fc12640..630ee693 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.h +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.h @@ -39,7 +39,7 @@ extern NSString *const BSGSessionUpdateNotification; /** Record a new auto-captured session if neededed. Auto-captured sessions are only - recorded and sent if -[BugsnagConfiguration shouldAutoCaptureSessions] is YES + recorded and sent if -[BugsnagConfiguration autoTrackSessions] is YES */ - (void)startNewSessionIfAutoCaptureEnabled; diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.m b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.m index ed184543..fbc868f9 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSessionTracker.m @@ -91,7 +91,7 @@ - (BugsnagSession *)runningSession { } - (void)startNewSessionIfAutoCaptureEnabled { - if (self.config.shouldAutoCaptureSessions && [self.config shouldSendReports]) { + if (self.config.autoTrackSessions) { [self startNewSessionWithAutoCaptureValue:YES]; } } diff --git a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSink.m b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSink.m index 42902e3b..98d45f86 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSink.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/BugsnagSink.m @@ -64,40 +64,7 @@ - (void)filterReports:(NSDictionary *)reports for (NSString *fileKey in reports) { NSDictionary *report = reports[fileKey]; - BugsnagCrashReport *bugsnagReport = [[BugsnagCrashReport alloc] initWithKSReport:report - fileMetadata:fileKey]; - BOOL incompleteReport = ([bugsnagReport isIncomplete] - || ![@"standard" isEqualToString:[report valueForKeyPath:@"report.type"]] - || [[report objectForKey:@"incomplete"] boolValue]); - - if (incompleteReport) { // append app/device data as this is unlikely to change between sessions - NSDictionary *sysInfo = [BSG_KSSystemInfo systemInfo]; - - // reset any existing data as it will be corrupted/nil - bugsnagReport.appState = @{}; - bugsnagReport.deviceState = @{}; - - - NSMutableDictionary *appDict = [NSMutableDictionary new]; - BSGDictInsertIfNotNil(appDict, sysInfo[@BSG_KSSystemField_BundleVersion], @"bundleVersion"); - BSGDictInsertIfNotNil(appDict, sysInfo[@BSG_KSSystemField_BundleID], @"id"); - BSGDictInsertIfNotNil(appDict, configuration.releaseStage, @"releaseStage"); - BSGDictInsertIfNotNil(appDict, sysInfo[@BSG_KSSystemField_SystemName], @"type"); - BSGDictInsertIfNotNil(appDict, sysInfo[@BSG_KSSystemField_BundleShortVersion], @"version"); - - NSMutableDictionary *deviceDict = [NSMutableDictionary new]; - BSGDictInsertIfNotNil(deviceDict, sysInfo[@BSG_KSSystemField_Jailbroken], @"jailbroken"); - BSGDictInsertIfNotNil(deviceDict, [[NSLocale currentLocale] localeIdentifier], @"locale"); - BSGDictInsertIfNotNil(deviceDict, sysInfo[@"Apple"], @"manufacturer"); - BSGDictInsertIfNotNil(deviceDict, sysInfo[@BSG_KSSystemField_Machine], @"model"); - BSGDictInsertIfNotNil(deviceDict, sysInfo[@BSG_KSSystemField_Model], @"modelNumber"); - BSGDictInsertIfNotNil(deviceDict, sysInfo[@BSG_KSSystemField_SystemName], @"osName"); - BSGDictInsertIfNotNil(deviceDict, sysInfo[@BSG_KSSystemField_SystemVersion], @"osVersion"); - - bugsnagReport.app = appDict; - bugsnagReport.device = deviceDict; - } - + BugsnagCrashReport *bugsnagReport = [[BugsnagCrashReport alloc] initWithKSReport:report]; if (![bugsnagReport shouldBeSent]) continue; BOOL shouldSend = YES; diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/BSG_KSCrashC.c b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/BSG_KSCrashC.c index a8675ea3..f26e5ae9 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/BSG_KSCrashC.c +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/BSG_KSCrashC.c @@ -55,53 +55,10 @@ static char *bsg_g_stateFilePath; // ============================================================================ #pragma mark - Utility - // ============================================================================ -static const int bsg_filepath_len = 512; -static const int bsg_error_class_filepath_len = 21; -static const char bsg_filepath_context_sep = '-'; - BSG_KSCrash_Context *crashContext(void) { return &bsg_g_crashReportContext; } -int bsg_create_filepath(char *base, char filepath[bsg_filepath_len], char severity, char error_class[bsg_error_class_filepath_len]) { - int length; - for (length = 0; length < bsg_filepath_len; length++) { - if (base[length] == '\0') { - break; - } - filepath[length] = base[length]; - } - if (length > 5) // Remove initial .json from path - length -= 5; - - // append contextual info - BSG_KSCrash_Context *context = crashContext(); - filepath[length++] = bsg_filepath_context_sep; - filepath[length++] = severity; - filepath[length++] = bsg_filepath_context_sep; - // 'h' for handled vs 'u'nhandled - filepath[length++] = context->crash.crashType == BSG_KSCrashTypeUserReported ? 'h' : 'u'; - filepath[length++] = bsg_filepath_context_sep; - for (int i = 0; error_class != NULL && i < bsg_error_class_filepath_len; i++) { - char c = error_class[i]; - if (c == '\0') - break; - else if (c == 47 || c > 126 || c <= 0) - // disallow '/' and characters outside of the ascii range - continue; - filepath[length++] = c; - } - // add suffix - filepath[length++] = '.'; - filepath[length++] = 'j'; - filepath[length++] = 's'; - filepath[length++] = 'o'; - filepath[length++] = 'n'; - filepath[length++] = '\0'; - - return length; -} - // ============================================================================ #pragma mark - Callbacks - // ============================================================================ @@ -112,7 +69,7 @@ int bsg_create_filepath(char *base, char filepath[bsg_filepath_len], char severi * * This function gets passed as a callback to a crash handler. */ -void bsg_kscrash_i_onCrash(char severity, char *errorClass, BSG_KSCrash_Context *context) { +void bsg_kscrash_i_onCrash(BSG_KSCrash_Context *context) { BSG_KSLOG_DEBUG("Updating application state to note crash."); bsg_kscrashstate_notifyAppCrash(context->crash.crashType); @@ -125,9 +82,7 @@ void bsg_kscrash_i_onCrash(char severity, char *errorClass, BSG_KSCrash_Context bsg_kscrashreport_writeMinimalReport(context, context->config.recrashReportFilePath); } else { - char filepath[bsg_filepath_len]; - bsg_create_filepath((char *)context->config.crashReportFilePath, filepath, severity, errorClass); - bsg_kscrashreport_writeStandardReport(context, filepath); + bsg_kscrashreport_writeStandardReport(context, context->config.crashReportFilePath); } } @@ -199,7 +154,7 @@ BSG_KSCrashType bsg_kscrash_setHandlingCrashTypes(BSG_KSCrashType crashTypes) { if (bsg_g_installed) { bsg_kscrashsentry_uninstall(~crashTypes); crashTypes = bsg_kscrashsentry_installWithContext( - &context->crash, crashTypes, (void(*)(char, char *, void *))bsg_kscrash_i_onCrash); + &context->crash, crashTypes, (void(*)(void *))bsg_kscrash_i_onCrash); } return crashTypes; diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.c b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.c index 76023c8f..63deb930 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.c +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.c @@ -90,7 +90,7 @@ static bool bsg_g_threads_are_running = true; BSG_KSCrashType bsg_kscrashsentry_installWithContext(BSG_KSCrash_SentryContext *context, BSG_KSCrashType crashTypes, - void (*onCrash)(char, char *, void *)) { + void (*onCrash)(void *)) { if (bsg_ksmachisBeingTraced()) { if (context->reportWhenDebuggerIsAttached) { BSG_KSLOG_WARN("KSCrash: App is running in a debugger. Crash " @@ -200,7 +200,7 @@ void bsg_kscrashsentry_resumeThreads(void) { } void bsg_kscrashsentry_clearContext(BSG_KSCrash_SentryContext *context) { - void (*onCrash)(char, char *, void *) = context->onCrash; + void (*onCrash)(void *) = context->onCrash; bool threadTracingEnabled = context->threadTracingEnabled; bool reportWhenDebuggerIsAttached = context->reportWhenDebuggerIsAttached; bool suspendThreadsForUserReported = context->suspendThreadsForUserReported; diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.h b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.h index f831c46c..add11c41 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.h +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry.h @@ -51,7 +51,7 @@ typedef struct BSG_KSCrash_SentryContext { // Caller defined values. Caller must fill these out prior to installation. /** Called by the crash handler when a crash is detected. */ - void (*onCrash)(char, char[21], void *); + void (*onCrash)(void *); /** If true, will suspend threads for user reported exceptions. */ bool suspendThreadsForUserReported; @@ -162,7 +162,7 @@ typedef struct BSG_KSCrash_SentryContext { BSG_KSCrashType bsg_kscrashsentry_installWithContext(BSG_KSCrash_SentryContext *context, BSG_KSCrashType crashTypes, - void (*onCrash)(char, char *, void *)); + void (*onCrash)(void *)); /** Uninstall crash sentry. * diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_CPPException.mm b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_CPPException.mm index c58cbce2..61107802 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_CPPException.mm +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_CPPException.mm @@ -180,9 +180,7 @@ static void CPPExceptionTerminate(void) { bsg_g_context->crashReason = description; BSG_KSLOG_DEBUG(@"Calling main crash handler."); - char errorClass[21]; - strncpy(errorClass, bsg_g_context->CPPException.name, sizeof(errorClass)); - bsg_g_context->onCrash('e', errorClass, crashContext()); + bsg_g_context->onCrash(crashContext()); BSG_KSLOG_DEBUG( @"Crash handling complete. Restoring original handlers."); diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_MachException.c b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_MachException.c index e002f8dc..71452ab8 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_MachException.c +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_MachException.c @@ -286,9 +286,7 @@ void *ksmachexc_i_handleExceptions(void *const userData) { bsg_g_context->mach.subcode = exceptionMessage.code[1]; BSG_KSLOG_DEBUG("Calling main crash handler."); - char errorClass[21]; - strncpy(errorClass, bsg_ksmachexceptionName(bsg_g_context->mach.type), sizeof(errorClass)); - bsg_g_context->onCrash('e', errorClass, crashContext()); + bsg_g_context->onCrash(crashContext()); BSG_KSLOG_DEBUG( "Crash handling complete. Restoring original handlers."); diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_NSException.m b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_NSException.m index aee21f7b..6330ba8f 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_NSException.m +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_NSException.m @@ -129,9 +129,7 @@ void bsg_recordException(NSException *exception) { bsg_g_context->stackTraceLength = (int)numFrames; BSG_KSLOG_DEBUG(@"Calling main crash handler."); - char errorClass[21]; - strncpy(errorClass, bsg_g_context->NSException.name, sizeof(errorClass)); - bsg_g_context->onCrash('e', errorClass, crashContext()); + bsg_g_context->onCrash(crashContext()); } } diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_Signal.c b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_Signal.c index d7fb2446..8e07bbba 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_Signal.c +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_Signal.c @@ -108,19 +108,7 @@ void bsg_kssighndl_i_handleSignal(int sigNum, siginfo_t *signalInfo, bsg_g_context->signal.signalInfo = signalInfo; BSG_KSLOG_DEBUG("Calling main crash handler."); - char errorClass[21]; - const char *sigName = bsg_kssignal_signalName(sigNum); - if (sigName != NULL) { - for (int i = 0; i < sizeof(errorClass); i++) { - char c = sigName[i]; - if (c == '\0') { - break; - } - errorClass[i] = c; - } - } - - bsg_g_context->onCrash('e', errorClass, crashContext()); + bsg_g_context->onCrash(crashContext()); BSG_KSLOG_DEBUG( "Crash handling complete. Restoring original handlers."); diff --git a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_User.c b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_User.c index 31e4e5db..a4c5a8c5 100644 --- a/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_User.c +++ b/cocoa/vendor/bugsnag-cocoa/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_User.c @@ -137,11 +137,7 @@ void bsg_kscrashsentry_reportUserException(const char *name, localContext->userException.state = appState; BSG_KSLOG_DEBUG("Calling main crash handler."); - char errorClass[21]; - strncpy(errorClass, localContext->userException.name, sizeof(errorClass)); - // default to 'w'arning level severity - char severityChar = severity != NULL && strlen(severity) > 0 ? severity[0] : 'w'; - localContext->onCrash(severityChar, errorClass, reportContext); + localContext->onCrash(reportContext); if (terminateProgram) { bsg_kscrashsentry_uninstall(BSG_KSCrashTypeAll); diff --git a/cocoa/vendor/bugsnag-cocoa/iOS/Bugsnag.xcodeproj/project.pbxproj b/cocoa/vendor/bugsnag-cocoa/iOS/Bugsnag.xcodeproj/project.pbxproj index a2784ab9..014d1dcb 100644 --- a/cocoa/vendor/bugsnag-cocoa/iOS/Bugsnag.xcodeproj/project.pbxproj +++ b/cocoa/vendor/bugsnag-cocoa/iOS/Bugsnag.xcodeproj/project.pbxproj @@ -10,7 +10,6 @@ 4B47970A22A9AE1F00FF9C2E /* BugsnagCrashReportFromKSCrashReportTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B47970922A9AE1F00FF9C2E /* BugsnagCrashReportFromKSCrashReportTest.m */; }; 4B775FCF22CBDEB4004839C5 /* BugsnagCollectionsBSGDictInsertIfNotNilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B775FCE22CBDEB4004839C5 /* BugsnagCollectionsBSGDictInsertIfNotNilTest.m */; }; 4BE6C42622CAD61A0056305D /* BugsnagCollectionsBSGDictMergeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE6C42522CAD61A0056305D /* BugsnagCollectionsBSGDictMergeTest.m */; }; - 8A12006A221C36420008C9C3 /* BSGFilepathTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A120069221C36420008C9C3 /* BSGFilepathTests.m */; }; 8A2C8F231C6BBD2300846019 /* Bugsnag.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A2C8F181C6BBD2300846019 /* Bugsnag.framework */; }; 8A2C8F4F1C6BBE3C00846019 /* Bugsnag.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A2C8F3D1C6BBE3C00846019 /* Bugsnag.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8A2C8F501C6BBE3C00846019 /* Bugsnag.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A2C8F3E1C6BBE3C00846019 /* Bugsnag.m */; }; @@ -32,6 +31,7 @@ 8A2C8F911C6BBFDD00846019 /* BugsnagSinkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A2C8F8D1C6BBFDD00846019 /* BugsnagSinkTests.m */; }; 8A2C8F961C6BC08600846019 /* report.json in Resources */ = {isa = PBXBuildFile; fileRef = 8A2C8F951C6BC08600846019 /* report.json */; }; 8A381D4B1EAA49A700AF8429 /* BugsnagLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A381D491EAA49A700AF8429 /* BugsnagLogger.h */; }; + 8A3C590923965D9400B344AA /* BugsnagPlugin.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8A72A0352396535000328051 /* BugsnagPlugin.h */; }; 8A4E733F1DC13281001F7CC8 /* BugsnagConfigurationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A4E733E1DC13281001F7CC8 /* BugsnagConfigurationTests.m */; }; 8A530CC022FDC3AF00F0C108 /* BSG_KSCrashIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A530CBE22FDC3AE00F0C108 /* BSG_KSCrashIdentifier.h */; }; 8A530CC122FDC3AF00F0C108 /* BSG_KSCrashIdentifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A530CBF22FDC3AE00F0C108 /* BSG_KSCrashIdentifier.m */; }; @@ -42,6 +42,7 @@ 8A70D9CA22539C81006B696F /* BSGOutOfMemoryWatchdog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A70D9C822539C81006B696F /* BSGOutOfMemoryWatchdog.m */; }; 8A70D9CB22539C81006B696F /* BSGOutOfMemoryWatchdog.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A70D9C822539C81006B696F /* BSGOutOfMemoryWatchdog.m */; }; 8A70D9CD2253C484006B696F /* BSGOutOfMemoryWatchdogTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A70D9CC2253C484006B696F /* BSGOutOfMemoryWatchdogTests.m */; }; + 8A72A0392396590300328051 /* BugsnagPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A72A0352396535000328051 /* BugsnagPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8AF1748E23070F0300902CC2 /* BSG_KSCrashIdentifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A530CBF22FDC3AE00F0C108 /* BSG_KSCrashIdentifier.m */; }; E70E52152216E41C00A590AB /* BugsnagSessionTrackerStopTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E70E52142216E41C00A590AB /* BugsnagSessionTrackerStopTest.m */; }; E70EE0781FD7039E00FA745C /* RFC3339DateTool_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = E70EE0771FD7039D00FA745C /* RFC3339DateTool_Tests.m */; }; @@ -322,6 +323,7 @@ dstPath = "include/${PRODUCT_NAME}"; dstSubfolderSpec = 16; files = ( + 8A3C590923965D9400B344AA /* BugsnagPlugin.h in CopyFiles */, E79148251FD828E6003EFEBF /* BugsnagKeys.h in CopyFiles */, E79148261FD828E6003EFEBF /* BugsnagSessionTracker.h in CopyFiles */, E79148271FD828E6003EFEBF /* BugsnagSession.h in CopyFiles */, @@ -399,7 +401,6 @@ 4B47970922A9AE1F00FF9C2E /* BugsnagCrashReportFromKSCrashReportTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BugsnagCrashReportFromKSCrashReportTest.m; sourceTree = ""; }; 4B775FCE22CBDEB4004839C5 /* BugsnagCollectionsBSGDictInsertIfNotNilTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagCollectionsBSGDictInsertIfNotNilTest.m; path = ../../Tests/BugsnagCollectionsBSGDictInsertIfNotNilTest.m; sourceTree = ""; }; 4BE6C42522CAD61A0056305D /* BugsnagCollectionsBSGDictMergeTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagCollectionsBSGDictMergeTest.m; path = ../../Tests/BugsnagCollectionsBSGDictMergeTest.m; sourceTree = ""; }; - 8A120069221C36420008C9C3 /* BSGFilepathTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BSGFilepathTests.m; path = ../../Tests/BSGFilepathTests.m; sourceTree = ""; }; 8A2C8F181C6BBD2300846019 /* Bugsnag.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Bugsnag.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8A2C8F1D1C6BBD2300846019 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; 8A2C8F221C6BBD2300846019 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -440,6 +441,7 @@ 8A70D9C722539C81006B696F /* BSGOutOfMemoryWatchdog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BSGOutOfMemoryWatchdog.h; path = ../Source/BSGOutOfMemoryWatchdog.h; sourceTree = ""; }; 8A70D9C822539C81006B696F /* BSGOutOfMemoryWatchdog.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BSGOutOfMemoryWatchdog.m; path = ../Source/BSGOutOfMemoryWatchdog.m; sourceTree = ""; }; 8A70D9CC2253C484006B696F /* BSGOutOfMemoryWatchdogTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSGOutOfMemoryWatchdogTests.m; sourceTree = ""; }; + 8A72A0352396535000328051 /* BugsnagPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BugsnagPlugin.h; path = ../Source/BugsnagPlugin.h; sourceTree = ""; }; 8AF2894923339CCA00E8EB27 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Config.xcconfig; path = ../Configurations/Config.xcconfig; sourceTree = ""; }; E70E52142216E41C00A590AB /* BugsnagSessionTrackerStopTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagSessionTrackerStopTest.m; path = ../../Tests/BugsnagSessionTrackerStopTest.m; sourceTree = ""; }; E70EE0771FD7039D00FA745C /* RFC3339DateTool_Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RFC3339DateTool_Tests.m; path = ../Tests/KSCrash/RFC3339DateTool_Tests.m; sourceTree = SOURCE_ROOT; }; @@ -693,6 +695,7 @@ 8A2C8F321C6BBD7200846019 /* module.modulemap */, 8A70D9C722539C81006B696F /* BSGOutOfMemoryWatchdog.h */, 8A70D9C822539C81006B696F /* BSGOutOfMemoryWatchdog.m */, + 8A72A0352396535000328051 /* BugsnagPlugin.h */, ); name = Bugsnag; sourceTree = SOURCE_ROOT; @@ -720,7 +723,6 @@ F42954B7D892334E7551F0F3 /* RegisterErrorDataTest.m */, F429551527EAE3AFE1F605FE /* BugsnagThreadTest.m */, E70E52142216E41C00A590AB /* BugsnagSessionTrackerStopTest.m */, - 8A120069221C36420008C9C3 /* BSGFilepathTests.m */, 8A70D9CC2253C484006B696F /* BSGOutOfMemoryWatchdogTests.m */, ); name = Tests; @@ -929,6 +931,7 @@ 8A2C8F5B1C6BBE3C00846019 /* BugsnagMetaData.h in Headers */, 8A2C8F551C6BBE3C00846019 /* BugsnagConfiguration.h in Headers */, E72BF7751FC867E4004BE82F /* BugsnagSessionTracker.h in Headers */, + 8A72A0392396590300328051 /* BugsnagPlugin.h in Headers */, 8A2C8F511C6BBE3C00846019 /* BugsnagBreadcrumb.h in Headers */, 8A2C8F571C6BBE3C00846019 /* BugsnagCrashReport.h in Headers */, E7107C4C1F4C97F100BB3F98 /* BSG_KSCrashSentry_CPPException.h in Headers */, @@ -1221,7 +1224,6 @@ F4295995C3259BF7D9730BC4 /* BugsnagKSCrashSysInfoParserTest.m in Sources */, E70E52152216E41C00A590AB /* BugsnagSessionTrackerStopTest.m in Sources */, F4295F017754324FD52CCE46 /* RegisterErrorDataTest.m in Sources */, - 8A12006A221C36420008C9C3 /* BSGFilepathTests.m in Sources */, F42952D83435C02F8D891C40 /* BugsnagThreadTest.m in Sources */, 4B47970A22A9AE1F00FF9C2E /* BugsnagCrashReportFromKSCrashReportTest.m in Sources */, ); diff --git a/cocoa/vendor/bugsnag-cocoa/iOS/module.modulemap b/cocoa/vendor/bugsnag-cocoa/iOS/module.modulemap index b0bb9148..feaba490 100644 --- a/cocoa/vendor/bugsnag-cocoa/iOS/module.modulemap +++ b/cocoa/vendor/bugsnag-cocoa/iOS/module.modulemap @@ -4,6 +4,7 @@ module Bugsnag { header "BugsnagConfiguration.h" header "BugsnagMetaData.h" header "BugsnagBreadcrumb.h" + header "BugsnagPlugin.h" export * module * { export * }