{"componentChunkName":"component---src-templates-doc-tsx","path":"/clients/react-native/sourcemaps/","result":{"data":{"file":{"id":"16670b1b-500f-5939-a087-a8045b9ed672","relativePath":"clients/react-native/sourcemaps.mdx","sourceInstanceName":"docs","childMarkdownRemark":null,"childMdx":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"draft\": false,\n  \"categories\": [],\n  \"toc\": true,\n  \"title\": \"Source Maps for Other Platforms\",\n  \"noindex\": true,\n  \"tags\": []\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Alert = makeShortcode(\"Alert\");\nvar CodeTabs = makeShortcode(\"CodeTabs\");\nvar CodeBlock = makeShortcode(\"CodeBlock\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(Alert, {\n    level: \"warning\",\n    title: \"Note\",\n    mdxType: \"Alert\"\n  }, mdx(\"markdown\", null, mdx(\"p\", null, \"This SDK has been superseded by the new React Native SDK. Sentry preserves this documentation for customers using the old client. We recommend using the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/platforms/react-native/\"\n  }), \"updated React Native SDK\"), \" for new projects.\"))), mdx(\"p\", null, \"Currently automatic source map handling is only implemented for iOS with Xcode and Android with gradle. If you manually invoke the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://github.com/facebook/metro\"\n  }), \"react-native packager\"), \" you can however get source maps anyways by passing \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"\\u2013sourcemap-output\"), \" to it.\"), mdx(\"p\", null, \"If you do get source maps you can upload them with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"sentry-cli\"), \". However make sure to pass \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"--rewrite\"), \" to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"upload-sourcemaps\"), \" command which will fix up the source maps before upload (inlines sources etc.).\"), mdx(\"p\", null, \"Example:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"bash\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"bash\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-bash\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"react-native bundle \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n  --dev \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token boolean\"\n  }), \"false\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n  --platform android \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n  --entry-file index.android.js \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n  --bundle-output android.main.bundle \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n  --sourcemap-output android.main.bundle.map\")))))), mdx(\"p\", null, \"To then upload you should use this:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"bash\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"bash\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-bash\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"node_modules/@sentry/cli/bin/sentry-cli releases \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n    files RELEASE_NAME \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n    upload-sourcemaps \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n    --dist DISTRIBUTION_NAME \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n    --strip-prefix /path/to/project/root \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"\\\\\"), \"\\n    --rewrite /path/to/your/files\")))))), mdx(\"p\", null, \"The values for \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"RELEASE_NAME\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"DISTRIBUTION_NAME\"), \" are as follows:\"), mdx(\"p\", null, mdx(\"dl\", {\n    parentName: \"p\"\n  }, mdx(\"dt\", {\n    parentName: \"dl\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"dt\"\n  }, \"RELEASE_NAME\"), \":\"), mdx(\"dd\", {\n    parentName: \"dl\"\n  }, \"the bundle ID or package name (reverse dns notation of your app) followed by a dash and the human readable version name that\\nis set for your release. So for instance \", mdx(\"inlineCode\", {\n    parentName: \"dd\"\n  }, \"com.example.myapp-1.0\"), \".\"))), mdx(\"p\", null, \"If you set the release name within your app, the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"RELEASE_NAME\"), \" should be the same value. e.g.\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"js\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"js\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-js\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"Sentry\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \".\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token function\"\n  }), \"setRelease\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"(\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token constant\"\n  }), \"RELEASE_NAME\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \")\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \";\"))))))), mdx(\"p\", null, mdx(\"dl\", {\n    parentName: \"p\"\n  }, mdx(\"dt\", {\n    parentName: \"dl\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"dt\"\n  }, \"DISTRIBUTION_NAME\"), \":\"), mdx(\"dd\", {\n    parentName: \"dl\"\n  }, \"This is the version code or build id depending on your platform. So for instance just set this to whatever is set in your \", mdx(\"em\", {\n    parentName: \"dd\"\n  }, \"Info.plist\"), \" or what your gradle setup generates (eg: \", mdx(\"inlineCode\", {\n    parentName: \"dd\"\n  }, \"52\"), \").\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"This SDK has been superseded by the new React Native SDK. Sentry preserves this documentation for customers using the old client. We recommend using the  updated React Native SDK  for new projects. Currently automatic source map handling is only implemented for iOS with Xcode and Android with gradle. If you manually invoke the  react-native packager  you can however get source maps anyways by passing  –sourcemap-output  to it. If you do get source maps you can upload them with  sentry-cli . However make sure to pass  --rewrite  to the  upload-sourcemaps  command which will fix up the source maps before upload (inlines sources etc.). Example: To then upload you should use this: The values for  RELEASE_NAME  and  DISTRIBUTION_NAME  are as follows: RELEASE_NAME : : the bundle ID or package name (reverse dns notation of your app) followed by a dash and the human readable version name that\nis set for your release. So for instance  com.example.myapp-1.0 . If you set the release name within your app, the  RELEASE_NAME  should be the same value. e.g. DISTRIBUTION_NAME : : This is the version code or build id depending on your platform. So for instance just set this to whatever is set in your  Info.plist  or what your gradle setup generates (eg:  52 ).","title":"Source Maps for Other Platforms","description":null,"draft":false,"noindex":true,"notoc":null,"sidebar_order":null,"redirect_from":null,"keywords":null,"id":"16670b1b-500f-5939-a087-a8045b9ed672","legacy":true}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2764967025","3345802723","3818502851","3990806462","4015007367","4192517163","4264099332","518019976"]}