Crashes - Sample Swift (iOS) App and Tutorials

Important

Visual Studio App Center is scheduled for retirement on March 31, 2025. While you can continue to use Visual Studio App Center until it is fully retired, there are several recommended alternatives that you may consider migrating to.

Learn more about support timelines and alternatives.

In this tutorial, you'll learn to view crashes from a sample Swift app in App Center.

If you haven't already, first follow the getting started tutorial to set up the sample app.

Get the symbols

To symbolicate crashes in iOS, App Center needs you to upload a symbol file to App Center. You can download symbols from a build in App Center, or skip this section and use your own.

If you already completed the Build tutorial and built the sample app:

  1. Navigate to the Build service in the portal.
  2. Select the main branch.
  3. Click on the latest successful build.
  4. Click Download > Download symbols at the top.

Upload symbols

  1. Navigate to the Crashes service and go to the Symbols page.
  2. Click Upload symbols at the top of the page and upload the symbol file you downloaded.

Open the sample app

  1. Run the sample app. If you're running it in the Xcode simulator, follow these additional steps to detach the debugger:
  2. Press the Stop icon to stop running the app.
  3. In the simulator, close the app. Press the home button twice (cmd+shift+h) and swipe up on the sample app.
  4. Reopen the app by clicking on its icon.

Crashing the sample app

  1. Swipe over to the Crashes page. Tap the Send a sample crash button to crash the app.
  2. Reopen the app. This sends the crash report to the App Center backend.

View the crashes in App Center

  1. Navigate to the Crashes service in App Center. It may take a couple minutes for the crash report to show up after reopening the app.
  2. Click on the crash to view its details, such as its stack trace, affected devices, and more.