New Relic React Native Agent nullability warning on iOS
Environment
- React Native: 0.79.5
- newrelic-react-native-agent: 1.5.6
- New Architecture: Disabled (newArchEnabled=false)
- Platform: iOS (iOS-only issue)
Issue
When calling setMaxEventBufferTime and setMaxEventPoolSize in my app on iOS, I'm getting the following warning:
Argument 0 (NSNumber) of NRMModularAgent.setMaxEventPoolSize has unspecified nullability but React requires that all NSNumber arguments are explicitly marked as nonnull to ensure compatibility with Android.
This happens with the following code:
NewRelic.startAgent(appToken, newRelicAgentConfiguration);
// Configure New Relic event buffering
if (__DEV__) {
NewRelic.setMaxEventBufferTime(60);
} else {
NewRelic.setMaxEventBufferTime(60 * 5);
}
NewRelic.setMaxEventPoolSize(10000);
Also, there is no error if New Architecture is turned on. Is this a known issue with the iOS implementation? Any recommendations on how to handle this?