BugsnagClassLevelMetadataStore
Objective-C
@protocol BugsnagClassLevelMetadataStore <NSObject>Swift
protocol BugsnagClassLevelMetadataStore : NSObjectProtocolA class-level protocol supporting the MetadataStore interface
- 
                  
                  Merge supplied and existing metadata. - Non-null values will replace existing values for identical keys. 
- Null values will remove the existing key/value pair if the key exists. Where null-valued keys do not exist they will not be set. (Since ObjC dicts can’t store ‘nil’ directly we assume [NSNUll null]) 
- Tabs are only created if at least one value is valid. 
- Invalid values (i.e. unserializable to JSON) are logged and ignored. 
 DeclarationObjective-C + (void)addMetadata:(NSDictionary *_Nonnull)metadata toSection:(NSString *_Nonnull)sectionName;Swift static func addMetadata(_ metadata: [AnyHashable : Any], section sectionName: String)ParametersmetadataA dictionary of string -> id key/value pairs. Values should be serializable to JSON. sectionNameThe name of the metadata section 
- 
                  
                  Add a piece of metadata to a particular key in a particular section. - Non-null values will replace existing values for identical keys. 
- Null values will remove the existing key/value pair if the key exists. Where null-valued keys do not exist they will not be set. (Since ObjC dicts can’t store ‘nil’ directly we assume [NSNUll null]) 
- Tabs are only created if at least one value is valid. 
- Invalid values (i.e. unserializable to JSON) are logged and ignored. 
 DeclarationObjective-C + (void)addMetadata:(id _Nullable)metadata withKey:(NSString *_Nonnull)key toSection:(NSString *_Nonnull)sectionName;Swift static func addMetadata(_ metadata: Any?, key: String, section sectionName: String)ParametersmetadataA dictionary of string -> id key/value pairs. Values should be serializable to JSON. keyThe metadata key to store the value under sectionNameThe name of the metadata section 
- 
                  
                  Get a named metadata section DeclarationObjective-C + (NSMutableDictionary *_Nullable)getMetadataFromSection: (NSString *_Nonnull)sectionName;Swift static func getMetadata(section sectionName: String) -> NSMutableDictionary?ParameterssectionNameThe name of the section @returns The mutable dictionary representing the metadata section, if it exists, or nil if not. 
- 
                  
                  Get a keyed value from a named metadata section DeclarationObjective-C + (id _Nullable)getMetadataFromSection:(NSString *_Nonnull)sectionName withKey:(NSString *_Nonnull)key;Swift static func getMetadata(section sectionName: String, key: String) -> Any?ParameterssectionNameThe name of the section keyThe key @returns The value if it exists, or nil if not. 
- 
                  
                  Remove a named metadata section, if it exists. DeclarationObjective-C + (void)clearMetadataFromSection:(NSString *_Nonnull)sectionName;Swift static func clearMetadata(section sectionName: String)ParameterssectionNameThe section name 
- 
                  
                  Remove a specific value for a specific key in a specific metadata section. If either section or key do not exist no action is taken. DeclarationObjective-C + (void)clearMetadataFromSection:(NSString *_Nonnull)sectionName withKey:(NSString *_Nonnull)key;Swift static func clearMetadata(section sectionName: String, key: String)ParameterssectionNameThe section name keythe metadata key 
 View on GitHub
View on GitHub Install in Dash
Install in Dash BugsnagClassLevelMetadataStore Protocol Reference
        BugsnagClassLevelMetadataStore Protocol Reference