Follow these procedures as appropriate to temporarily disable New Relic Mobile's React Native agent or to remove it completely from your mobile application.
Disable the agent
You may want to temporarily disable the agent; for example, to troubleshoot whether the agent is causing crashes or slowness, or to troubleshoot other problems in your application.
- To disable the agent, remove or comment out any New Relic API calls.
- To re-enable the agent, re-add or uncomment your New Relic API calls.
Uninstall the agent
The uninstall procedure removes the React Native agent and New Relic CLI.
Ensure that all relevant development environments (Xcode, Android Studio, etc.) and the React Native Metro bundler are closed.
From the root of your project, run the following commands. Replace
VERSIONwith your React Native agent release:
npx newrelic-mobile-react-native remove --verbose npm uninstall newrelic-mobile-rn npm uninstall newrelic-mobile-cli rm newrelic.json
- Clean all build folders, and then restart.