5.9 KiB
title, description, keywords, author, ms.author, ms.date, ms.topic, ms.assetid, ms.service, ms.custom
| title | description | keywords | author | ms.author | ms.date | ms.topic | ms.assetid | ms.service | ms.custom |
|---|---|---|---|---|---|---|---|---|---|
| iOS Symbolication | Help understanding symbolication for iOS and macOS diagnostics in App Center | crashes, errors, iOS, macOS, symbols, symbolication | lucen-ms | lucen | 12/17/2019 | article | 64fe5d88-d981-42bf-8ca9-8f273aa7e2ea | vs-appcenter | analytics |
iOS Symbolication
[!INCLUDE Retirement announcement for App Center]
macOS, tvOS, and iOS crash reports show the stack traces for all running threads of your app at the time a crash occurred. The stack traces only contain memory addresses; not class names, methods, file names, or line numbers needed to understand the crashes.
To get the memory addresses translated you need to upload a dSYM package to App Center, which contains all information required for symbolication. You can learn more about symbolication from Apple’s official developer documentation.
The App Center Build and Distribution service can automatically generate a valid dSYM and source map .zip file and upload the file to the Diagnostics service. If you use App Center to build and auto distribute your app to your end users, you don't need to manually obtain and upload the symbol files.
Unsymbolicated crashes
[!INCLUDE unsymbolicated crashes]
Finding the .dSYM bundle
- In Xcode, open the Window menu, then select Organizer.
- Select the Archives tab.
- Select your app in the left sidebar.
- Right-click on the latest archive and select Show in Finder.
- Right-click the
.xcarchivefile in Finder and select Show Package Contents. - You should see a folder named
dSYMsthat contains your dSYM bundle. - Create a zip file of the dSYM bundle.
If you're using Visual Studio instead of Xcode, see Where can I find the dSYM file to symbolicate iOS crash logs? to find the dSYM file.
Uploading symbols
App Center Portal
[!INCLUDE symbol upload ui]
React Native iOS apps
To obtain symbol files for React Native iOS files, create a ZIP file with the dSYM package on your Mac and the JavaScript source map of your app. The source map should be named index.ios.map. The commands below will generate the source map for release builds:
react-native bundle --entry-file index.ios.js --platform ios --dev false --reset-cache --bundle-output unused.jsbundle --sourcemap-output index.ios.map
App Center API
The process for uploading symbols through the API involves a series of three API calls: one to allocate space on our backend, one to upload the file, and one to update the status of the upload. The body of the first API call should set symbol_type to Apple.
[!INCLUDE symbol upload api]
App Center CLI
You can also use the CLI to upload symbol files:
appcenter crashes upload-symbols --symbol {symbol file}
Bitcode
Bitcode was introduced by Apple to allow apps sent to the App Store to be recompiled by Apple itself and apply the latest optimization. If Bitcode is enabled, the symbols generated for your app in the store will be different than the ones from your own build system.
App Center crash reporting doesn't completely support the symbolication of crashes from bitcode-enabled apps yet. In the meantime, we advise that you disable bitcode. Disabling bitcode significantly simplifies symbols management and currently doesn't have any known downsides for iOS apps.
Disable bitcode for your app
- In Xcode, open your project settings by clicking on the top-level element in the Project Navigator
- Go to the Build Settings page
- Search for
bitcode - In the result, change the value from Yes to No
- Rebuild your app
With these simple steps, App Center crash reporting will behave as usual.
Retrieve symbols for bitcode enabled apps
If you want to keep bitcode enabled, you can download the proper dSYM files by following these steps:
- Open the Xcode's Organizer
- Select the specific archive of your app that you uploaded to iTunes Connect
- Click on the "Download dSYMs" button. This step will insert the Bitcode compiled dSYM files into the original archive.
- Upload the symbols to the corresponding app and version in App Center
If the Xcode organizer doesn't provide any new symbols, you must download the dSYM files from the iTunes Connect portal by following these steps:
- Select your app in the iTunes Connect portal
- Select the Activity tab on top
- Select the build version of your app that has the missing symbols
- Click the Download dSYM link
- Upload the downloaded file to App Center. This file contains the symbols required for App Center to symbolicated your crashes.
Troubleshooting symbol issues
If your crashes still appear unsymbolicated after uploading symbols and disabling bitcode, it might be because the uploaded dSYM files don't match the ones required by App Center. When you upload dSYM files, App Center matches them to the right app version based on their UUIDs.
You can double check whether your dSYM files have the right UUIDs by using a CLI tool called dwarfdump.
- Find the UUID in the dSYM file:
dwarfdump --u CrashProbeiOS.app.dSYM
- The result should look something like this:
UUID:ADF53C85-4638-3EFF-A33C-42C13A18E915 (armv7)CrashProbeiOS.app.dSYM/Contents/Resources/DWARF/CrashProbeiOS
UUID:D449E33D-7E74-379D-8B79-15EE104ED1DF (arm64)CrashProbeiOS.app.dSYM/Contents/Resources/DWARF/CrashProbeiOS
- Double check if the UUID returned matches the UUIDs shown in the debug symbols dialog:
[!INCLUDE ignoring symbols]
