Skip to content

Commit

Permalink
Merge pull request #1225 from bugsnag/nickdowell/bugsnag-cocoa-v6.5.0
Browse files Browse the repository at this point in the history
deps(react-native): Bump bugsnag-cocoa to v6.5.0
  • Loading branch information
nickdowell committed Jan 7, 2021
2 parents 599fa45 + 9547f8e commit c3e647b
Show file tree
Hide file tree
Showing 50 changed files with 1,229 additions and 775 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
### Changed

- (expo): Add support for Expo SDK v40 [#1219](https://github.com/bugsnag/bugsnag-js/pull/1219)
- (react-native): Update bugsnag-cocoa to v6.5.0
- Add `errorClass` configuration option. [bugsnag-cocoa#938](https://github.com/bugsnag/bugsnag-cocoa/pull/938)
- Add `maxPersistedEvents` configuration option. [bugsnag-cocoa#936](https://github.com/bugsnag/bugsnag-cocoa/pull/936)
- Add `maxPersistedSessions` configuration option. [bugsnag-cocoa#943](https://github.com/bugsnag/bugsnag-cocoa/pull/943)
- Add `[Bugsnag]` prefix to log messages. [bugsnag-cocoa#955](https://github.com/bugsnag/bugsnag-cocoa/pull/955)
- Fix reliability of Swift fatal error message reporting. [bugsnag-cocoa#948](https://github.com/bugsnag/bugsnag-cocoa/pull/948)

## v7.5.5 (2020-12-14)

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/ios/.bugsnag-cocoa-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
59881aff8a17e68b6027aac3f3ac0aa05d266cdc
75ea085426f483b2fd46dbcae9a3a5d2a3f5496c
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,28 @@

#import "BugsnagEventDeserializer.h"

#import "Bugsnag+Private.h"
#import "BugsnagAppWithState+Private.h"
#import "BugsnagBreadcrumb+Private.h"
#import "BugsnagClient+Private.h"
#import "BugsnagDeviceWithState+Private.h"
#import "BugsnagError+Private.h"
#import "BugsnagEvent+Private.h"
#import "BugsnagHandledState.h"
#import "BugsnagSessionTracker+Private.h"
#import "BugsnagStacktrace.h"

BSGSeverity BSGParseSeverity(NSString *severity);

@interface Bugsnag ()
+ (id)client;
+ (BugsnagConfiguration *)configuration;
@end

@interface BugsnagClient()
@property id sessionTracker;
@property BugsnagMetadata *metadata;
@end

@interface BugsnagError ()

- (instancetype)initWithErrorClass:(NSString *)errorClass
errorMessage:(NSString *)errorMessage
errorType:(BSGErrorType)errorType
stacktrace:(NSArray<BugsnagStackframe *> *)stacktrace;

@end

@interface BugsnagMetadata ()
@end

@interface BugsnagHandledState: NSObject
- (instancetype)initWithSeverityReason:(NSUInteger)severityReason
severity:(BSGSeverity)severity
unhandled:(BOOL)unhandled
unhandledOverridden:(BOOL)unhandledOverridden
attrValue:(NSString *)attrValue;
+ (NSUInteger)severityReasonFromString:(NSString *)string;
@end

@interface BugsnagAppWithState()
+ (BugsnagAppWithState *)appFromJson:(NSDictionary *)json;
@end

@interface BugsnagDeviceWithState()
+ (BugsnagDeviceWithState *)deviceFromJson:(NSDictionary *)json;
@end

@interface BugsnagUser()
- (instancetype)initWithDictionary:(NSDictionary *)dict;
@end

@interface BugsnagThread ()
+ (instancetype)threadFromJson:(NSDictionary *)json;
@end
#import "BugsnagThread+Private.h"
#import "BugsnagUser+Private.h"

@interface BugsnagEvent ()
- (instancetype)initWithApp:(BugsnagAppWithState *)app
device:(BugsnagDeviceWithState *)device
handledState:(BugsnagHandledState *)handledState
user:(BugsnagUser *)user
metadata:(BugsnagMetadata *)metadata
breadcrumbs:(NSArray<BugsnagBreadcrumb *> *)breadcrumbs
errors:(NSArray<BugsnagError *> *)errors
threads:(NSArray<BugsnagThread *> *)threads
session:(BugsnagSession *)session;
- (NSDictionary *)toJson;
- (void)attachCustomStacktrace:(NSArray *)frames withType:(NSString *)type;
@end

@interface BugsnagBreadcrumb ()
+ (instancetype)breadcrumbFromDict:(NSDictionary *)dict;
@end

@implementation BugsnagEventDeserializer

- (BugsnagEvent *)deserializeEvent:(NSDictionary *)payload {
BugsnagClient *client = [Bugsnag client];
BugsnagSession *session = [client.sessionTracker valueForKey:@"runningSession"];
BugsnagSession *session = client.sessionTracker.runningSession;
BugsnagMetadata *metadata = [[BugsnagMetadata alloc] initWithDictionary:payload[@"metadata"]];

BugsnagHandledState *handledState = [self deserializeHandledState:payload];
Expand Down
30 changes: 3 additions & 27 deletions packages/react-native/ios/BugsnagReactNative/BugsnagReactNative.m
Original file line number Diff line number Diff line change
@@ -1,43 +1,19 @@
#import "Bugsnag.h"
#import "BugsnagClient.h"
#import "BugsnagReactNative.h"

#import "Bugsnag+Private.h"
#import "BugsnagClient+Private.h"
#import "BugsnagReactNativeEmitter.h"
#import "BugsnagConfigSerializer.h"
#import "BugsnagEventDeserializer.h"

@interface BugsnagClient ()
- (NSDictionary *)collectAppWithState;
- (NSDictionary *)collectDeviceWithState;
- (NSArray *)collectBreadcrumbs;
- (NSArray *)collectThreads:(BOOL)unhandled;
@property id notifier;
@property id sessionTracker;
@property BugsnagMetadata *metadata;
@end

@interface Bugsnag ()
+ (BugsnagClient *)client;
+ (BOOL)bugsnagStarted;
+ (BugsnagConfiguration *)configuration;
+ (void)updateCodeBundleId:(NSString *)codeBundleId;
+ (void)notifyInternal:(BugsnagEvent *_Nonnull)event
block:(BOOL (^_Nonnull)(BugsnagEvent *_Nonnull))block;
+ (void)addRuntimeVersionInfo:(NSString *)info
withKey:(NSString *)key;
@end

@interface BugsnagMetadata ()
@end

@interface BugsnagEvent ()
- (instancetype _Nonnull)initWithErrorName:(NSString *_Nonnull)name
errorMessage:(NSString *_Nonnull)message
configuration:(BugsnagConfiguration *_Nonnull)config
metadata:(BugsnagMetadata *_Nullable)metadata
handledState:(BugsnagHandledState *_Nonnull)handledState
session:(BugsnagSession *_Nullable)session;
@end

@interface BugsnagReactNative ()
@property (nonatomic) BugsnagConfigSerializer *configSerializer;
@end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
#import "BugsnagReactNativeEmitter.h"
#import "Bugsnag.h"
#import "BugsnagClient.h"

@interface BugsnagStateEvent: NSObject
@property NSString *type;
@property id data;
@end
#import "Bugsnag+Private.h"
#import "BugsnagClient.h"
#import "BugsnagStateEvent.h"

typedef void (^BugsnagObserverBlock)(BugsnagStateEvent *_Nonnull event);

@interface Bugsnag ()
+ (BugsnagClient *)client;
@end

@interface BugsnagClient ()
- (void)addObserverWithBlock:(BugsnagObserverBlock _Nonnull)block;
- (void)removeObserverWithBlock:(BugsnagObserverBlock _Nonnull)block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#import "BugsnagReactNativePlugin.h"

#import "Bugsnag.h"
#import "BugsnagClient.h"
#import "BugsnagClient+Private.h"
#import "BugsnagConfiguration.h"
#import "BugsnagError.h"
#import "BugsnagReactNativePlugin.h"

@interface BugsnagClient ()
@property(nonatomic, readwrite, retain) BugsnagConfiguration * configuration;
@end

@interface BugsnagReactNativePlugin () <BugsnagPlugin>
@end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bugsnag",
"version": "6.4.1",
"version": "6.5.0",
"summary": "The Bugsnag crash reporting framework for Apple platforms.",
"homepage": "https://bugsnag.com",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
},
"source": {
"git": "https://github.com/bugsnag/bugsnag-cocoa.git",
"tag": "v6.4.1"
"tag": "v6.5.0"
},
"frameworks": [
"Foundation",
Expand Down
Loading

0 comments on commit c3e647b

Please sign in to comment.