diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fadb403f..7f9c254b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ Bugsnag Notifiers on other platforms. ## Enhancements +* 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) diff --git a/Source/Bugsnag.m b/Source/Bugsnag.m index 9faa6dbde..f80c7f7a0 100644 --- a/Source/Bugsnag.m +++ b/Source/Bugsnag.m @@ -51,6 +51,10 @@ @interface BugsnagClient () - (void)startListeningForStateChangeNotification:(NSString *_Nonnull)notificationName; @end +@interface BugsnagMetadata () +- (NSDictionary *_Nonnull)toDictionary; +@end + @implementation Bugsnag + (void)startBugsnagWithApiKey:(NSString *)apiKey { diff --git a/Source/BugsnagClient.m b/Source/BugsnagClient.m index eba3e5780..9bafebdac 100644 --- a/Source/BugsnagClient.m +++ b/Source/BugsnagClient.m @@ -219,6 +219,11 @@ @interface BugsnagConfiguration () @property(readonly, strong, nullable) BugsnagBreadcrumbs *breadcrumbs; @end +@interface BugsnagMetadata () +- (NSDictionary *_Nonnull)toDictionary; +@property(unsafe_unretained) id _Nullable delegate; +@end + @implementation BugsnagClient @synthesize configuration; diff --git a/Source/BugsnagMetadata.h b/Source/BugsnagMetadata.h index 734e13c5e..c4fbc6966 100644 --- a/Source/BugsnagMetadata.h +++ b/Source/BugsnagMetadata.h @@ -26,8 +26,6 @@ #import -@protocol BugsnagMetadataDelegate; - @interface BugsnagMetadata : NSObject - (instancetype _Nonnull)initWithDictionary:(NSMutableDictionary *_Nonnull)dict; @@ -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 _Nullable delegate; - /** * Merge supplied and existing metadata. * diff --git a/Source/BugsnagMetadata.m b/Source/BugsnagMetadata.m index 553c2a03a..7f704758f 100644 --- a/Source/BugsnagMetadata.m +++ b/Source/BugsnagMetadata.m @@ -30,6 +30,8 @@ @interface BugsnagMetadata () @property(atomic, strong) NSMutableDictionary *dictionary; +- (NSDictionary *_Nonnull)toDictionary; +@property(unsafe_unretained) id _Nullable delegate; @end @implementation BugsnagMetadata diff --git a/Tests/BugsnagEventTests.m b/Tests/BugsnagEventTests.m index f9a2713ca..fdece3bd8 100644 --- a/Tests/BugsnagEventTests.m +++ b/Tests/BugsnagEventTests.m @@ -21,6 +21,10 @@ @interface Bugsnag () + (BugsnagConfiguration *)configuration; @end +@interface BugsnagMetadata () +- (NSDictionary *_Nonnull)toDictionary; +@end + @interface BugsnagEventTests : BugsnagBaseUnitTest @end diff --git a/Tests/BugsnagMetadataTests.m b/Tests/BugsnagMetadataTests.m index 21e76dfc1..fc45ff36f 100644 --- a/Tests/BugsnagMetadataTests.m +++ b/Tests/BugsnagMetadataTests.m @@ -18,6 +18,8 @@ @interface BugsnagMetadataTests : XCTestCase @interface BugsnagMetadata () @property(atomic, strong) NSMutableDictionary *dictionary; +- (NSDictionary *_Nonnull)toDictionary; +@property(unsafe_unretained) id _Nullable delegate; @end // MARK: - DummyClass diff --git a/UPGRADING.md b/UPGRADING.md index 2a872e868..382759a46 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -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