Information about crashes on iOS is sent in unsymbolicated crash logs. It's difficult to extract data for analysis from these crash logs. To analyze the crash logs, upload dSYM files to AppMetrica.
The AppMetrica SDK has a built-in command-line tool named helper for uploading dSYM files. To build an app based on fastlane, use the upload plugin. It helps you set up automatic dSYM file uploads when building your app.
If Bitcode generation is enabled and you use fastlane to build your app:
Install the appmetrica fastlane plugin:
fastlane add_plugin appmetrica
For more information about how to add the plugin, see fastlane docs.
Add the following to the fastlane/Fastfile file:
lane :release do# Your actions before.
gym(
workspace: "MyApp.xcworkspace",
configuration: "Release",
scheme: "MyApp",
export_method: "app-store"# Pass the correct export_method.
)
upload_symbols_to_appmetrica(post_api_key: "Post API key")
# Your actions after.
end
You can get the Post API key in the AppMetrica Settings. It's used to identify your app.
Alert
Apps are built using the gym action with export enabled. If you build your app using Xcode, the app is recompiled after you upload it to App Store Connect. In this case, you won't be able to use the dSYM files generated during the build.
If Bitcode generation is disabled
If Bitcode generation is disabled and you build your app using Xcode, you can add to the Build Phases a stage for uploading dSYM files via the helper.
Note
The helper tool has been supported since version 3.8.0 of the AppMetrica SDK. It's in the SDK archive.
Open the project in Xcode.
In the project navigator, select the project file.
In the Targets block, select your app.
Open the Build Phases tab.
Click + → New Run Script Phase.
Add the following to the Type a script field:
if [ -d "${PODS_ROOT}/YandexMobileMetrica" ]; then
HELPER_PATH=`find "${PODS_ROOT}/YandexMobileMetrica" -name "helper"`
if [ -x "${HELPER_PATH}" ]; then"${HELPER_PATH}" auto --post-api-key="Post API key"&
elseecho"AppMetrica crash helper was not found"fifi
Note
auto mode uses the CONFIGURATION environment variable. If the build is done with the Debug configuration, no dSYM files are uploaded.
Learn more about the download_dsyms action in the fastlane documentation.
Find the necessary archive with the dSYM file:
If Bitcode generation is enabled
Via Xcode Organizer
In the Xcode interface, click Window → Organizer.
In the Archives tab, select the appropriate app version.
Click Download dSYM.
Via App Store Connect
In the iTunes Connect interface, open the Activity page.
In the All Builds tab, select the appropriate build number.
Click Download dSYM.
If Bitcode generation is disabled
You can use the dSYM file that was generated during the build.
In the AppMetrica interface, go to the app settings from the menu on the left.
Open Crashes → iOS.
Click Choose file and upload the ZIP archive containing the app.dSYM or app directory.
Alert
This option is only suitable for apps that are built without Bitcode.
To use the plugin, install the AppMetrica SDK with version 3.8.0 or higher.
To upload missing dSYM files to AppMetrica, run the following command in the terminal:
helper -k <post-api-key> <file_path>
file_path — A list of dSYM files or the folders where they're stored.
If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.