123456 |
- {
- "html": "<div class=\"section\" id=\"installation\">\n<h2>Installation</h2>\n<p>Start by adding Sentry and then linking it:</p>\n<div class=\"highlight-python\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span>$ npm install react-native-sentry --save\n# or\n# yarn add react-native-sentry\n# if you are using yarn\n# this is for linking\n$ react-native link react-native-sentry\n</pre></div>\n</div>\n<p>The <cite>link</cite> step will pull in the native dependency and patch your project\naccordingly. If you are using expo you don’t have to (or can’t) run that\nlink step. For more information about that see <a class=\"reference internal\" href=\"https://docs.getsentry.com/clients/react-native/expo/\"><em>Using Sentry with Expo</em></a>.</p>\n<p>On linking you will automatically be prompted for your DSN and other\ninformation and we will configure your app automatically for react-native\nand change files accordingly. You will need to provide the following\ndata: your DSN, the slug of your organization in Sentry, the slug of your\nproject in Sentry as well as the Auth token. We need the Auth token for\nuploading the sourcemaps.</p>\n<p>You can find the slugs in the URL of your project\n(<code class=\"docutils literal\"><span class=\"pre\">sentry.io/your-org-slug/your-project-slug</span></code>) If you don’t have an auth\ntoken yet you can <a class=\"reference external\" href=\"https://sentry.io/api/\">create an auth token here</a>.</p>\n<p>Upon linking the following changes will be performed:</p>\n<ul class=\"simple\">\n<li>add the raven-java package for native crash reporting on Android</li>\n<li>add the sentry-swift package for native crash reporting on iOS</li>\n<li>enable the sentry gradle build step for android</li>\n<li>patch <cite>AppDelegate.m</cite> for iOS</li>\n<li>patch <cite>MainApplication.java</cite> for Android</li>\n<li>configure Sentry for the supplied DSN in your <cite>index.js</cite> files</li>\n<li>store build credentials in <cite>ios/sentry.properties</cite> and\n<cite>android/sentry.properties</cite>.</li>\n</ul>\n<p>To see what is happening during linking you can refer to\n<a class=\"reference internal\" href=\"https://docs.getsentry.com/clients/react-native/manual-setup/\"><em>Manual Setup</em></a> which will give you all the details.</p>\n<p>Note that we only support <code class=\"docutils literal\"><span class=\"pre\">react-native</span> <span class=\"pre\">>=</span> <span class=\"pre\">0.38</span></code> at the moment.</p>\n</div>\n\n\n<div class=\"section\" id=\"client-configuration\">\n<h2>Client Configuration</h2>\n<p>Note: When you run <code class=\"docutils literal\"><span class=\"pre\">react-native</span> <span class=\"pre\">link</span></code> we will automatically update your\n<cite>index.ios.js</cite> / <cite>index.android.js</cite> with the following changes:</p>\n<div class=\"highlight-javascript\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span><span style=\"color: #2eb0f7\">import</span> <span style=\"color: #111111\">{</span> <span style=\"color: #111111\">Sentry</span> <span style=\"color: #111111\">}</span> <span style=\"color: #111111\">from</span> <span style=\"color: #e8535a\">'react-native-sentry'</span><span style=\"color: #111111\">;</span>\n<span style=\"color: #111111\">Sentry.config(</span><span style=\"color: #e8535a\">'___DSN___'</span><span style=\"color: #111111\">).install();</span>\n</pre></div>\n</div>\n<p>You can pass additional configuration options to the <cite>config()</cite> method if\nyou want to do so.</p>\n</div>\n",
- "link": "https://docs.getsentry.com/platforms/apple/",
- "id": "apple",
- "name": "Apple"
- }
|