我正在尝试在我的 react-native 应用程序中配置 bugsnag,但我目前无法指定已编辑的密钥。以下指南提到我可以使用正则表达式:
https://docs.bugsnag.com/platforms/ios/configuration-options/#redactedkeys
但是那里的示例仅指定了字符串:
BugsnagConfiguration *config = [BugsnagConfiguration loadConfig];
config.redactedKeys = [NSSet setWithArray:@[@"password", @"credit_card_number"]];
[Bugsnag startWithConfiguration:config];
但是,我对objective-c一无所知。我有以下两个我想使用的正则表达式:
[/\w*password\w*/i, /\w*sessiontoken\w*/i]
如何将它们添加到 bugsnag 的配置中?