Create sentry.options.json in the React Native project root and set options the same as you currently have in Sentry.init in JS.
Initialize Sentry on the native layers by newly provided native methods.
import io.sentry.react.RNSentrySDK
class MainApplication : Application(), ReactApplication {
override fun onCreate() {
super.onCreate()
RNSentrySDK.init(this)
}
}
#import <RNSentry/RNSentry.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[RNSentrySDK start];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
Development
Tasks
Native RNSentry.init tasks
Available in https://github.com/getsentry/sentry-react-native/releases/tag/6.7.0-alpha.0
Create
sentry.options.jsonin the React Native project root and set options the same as you currently have inSentry.initin JS.{ "dsn": "https://[email protected]/value", }Initialize Sentry on the native layers by newly provided native methods.
Development
Tasks
@sentry/wizardto optionally usesentry.options.jsonNative RNSentry.init tasks
sentry-react-native/ios/RNSentry.mm
Line 127 in 9421616
sentry-react-native/ios/RNSentry.mm
Line 177 in 9421616