Skip to content

Commit

Permalink
Merge branch 'v6' into v6-remove-event-apis
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Mar 27, 2020
2 parents 6814f48 + 83c98a8 commit f09813a
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Bugsnag Notifiers on other platforms.
* Remove unused APIs on `BugsnagEvent` interface
[#498](https://github.com/bugsnag/bugsnag-cocoa/pull/498)

* Remove unused APIs from `BugsnagMetadata` interface
[#501](https://github.com/bugsnag/bugsnag-cocoa/pull/501)

* Remove unused APIs from `BugsnagConfiguration` interface
[#496](https://github.com/bugsnag/bugsnag-cocoa/pull/496)

Expand Down
4 changes: 4 additions & 0 deletions Source/Bugsnag.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ @interface BugsnagClient ()
- (void)startListeningForStateChangeNotification:(NSString *_Nonnull)notificationName;
@end

@interface BugsnagMetadata ()
- (NSDictionary *_Nonnull)toDictionary;
@end

@implementation Bugsnag

+ (void)startBugsnagWithApiKey:(NSString *)apiKey {
Expand Down
5 changes: 5 additions & 0 deletions Source/BugsnagClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ @interface BugsnagEvent ()
@property(readwrite) NSUInteger depth;
@end

@interface BugsnagMetadata ()
- (NSDictionary *_Nonnull)toDictionary;
@property(unsafe_unretained) id<BugsnagMetadataDelegate> _Nullable delegate;
@end

@implementation BugsnagClient

@synthesize configuration;
Expand Down
6 changes: 0 additions & 6 deletions Source/BugsnagMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#import <Foundation/Foundation.h>

@protocol BugsnagMetadataDelegate;

@interface BugsnagMetadata : NSObject <NSMutableCopying>

- (instancetype _Nonnull)initWithDictionary:(NSMutableDictionary *_Nonnull)dict;
Expand Down Expand Up @@ -71,14 +69,10 @@
key:(NSString *_Nonnull)key
NS_SWIFT_NAME(clearMetadata(section:key:));

- (NSDictionary *_Nonnull)toDictionary;

- (void)addAttribute:(NSString *_Nonnull)attributeName
withValue:(id _Nullable)value
toTabWithName:(NSString *_Nonnull)sectionName;

@property(unsafe_unretained) id<BugsnagMetadataDelegate> _Nullable delegate;

/**
* Merge supplied and existing metadata.
*
Expand Down
2 changes: 2 additions & 0 deletions Source/BugsnagMetadata.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

@interface BugsnagMetadata ()
@property(atomic, strong) NSMutableDictionary *dictionary;
- (NSDictionary *_Nonnull)toDictionary;
@property(unsafe_unretained) id<BugsnagMetadataDelegate> _Nullable delegate;
@end

@implementation BugsnagMetadata
Expand Down
4 changes: 4 additions & 0 deletions Tests/BugsnagEventTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ - (BOOL)shouldBeSent;
@property(readwrite) NSUInteger depth;
@end

@interface BugsnagMetadata ()
- (NSDictionary *_Nonnull)toDictionary;
@end

@interface BugsnagEventTests : BugsnagBaseUnitTest
@end

Expand Down
2 changes: 2 additions & 0 deletions Tests/BugsnagMetadataTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ @interface BugsnagMetadataTests : XCTestCase <BugsnagMetadataDelegate>

@interface BugsnagMetadata ()
@property(atomic, strong) NSMutableDictionary *dictionary;
- (NSDictionary *_Nonnull)toDictionary;
@property(unsafe_unretained) id<BugsnagMetadataDelegate> _Nullable delegate;
@end

// MARK: - DummyClass
Expand Down
9 changes: 8 additions & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,14 @@ Swift:
```

Note that `BugsnagMetadata.getTab()` previously would create a metadata section if it
did not exist; the new behaviour in `getMetadata` is to return `nil`.
did not exist; the new behaviour in `getMetadata` is to return `nil`.

#### Removals

```diff
- toDictionary
- delegate
```

### `BugsnagBreadcrumb` class

Expand Down

0 comments on commit f09813a

Please sign in to comment.