rollbar / rollbar-ios

Objective-C library for crash reporting and logging with Rollbar.

Home Page:https://docs.rollbar.com/docs/ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to set custom data in `RollbarConfiguration` is unavailable

pauarmada opened this issue · comments

I would like to be able to set a value which is supposed to be attached to all the Rollbar events generated by our App. I used to be able to do this before using the following syntax

Rollbar.currentConfiguration()?.setValue(value, forUndefinedKey: key)

However, the recent release has this code block commented out

//- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
// if (value) {
// _customData[key] = value;
// } else {
// [_customData removeObjectForKey:key];
// }
//
// [self save];
//}
//
//- (id)valueForUndefinedKey:(NSString *)key {
// return _customData[key];
//}

Is there an alternative way to set this which I am missing?

Thanks

@pauarmada , we will be deprecating RollbarConfiguration in favor of RollbaConfig. Please, use:
Rollbar.currentConfiguration()?.asRollbarConfig()?.customData = ["someKey": "someValue", ];
to set custom key-values.

Awesome! Thanks!