With the Crash service, you can symbolicate a crash report based on the iOS symbol file to obtain a readable report, when classes, fields, and methods in code are overridden with unreadable code during compilation. This article describes how to generate and upload an iOS symbol file.
Automatically Uploading the iOS Symbol File
1) Download the script used for automatically uploading the iOS symbol file.
2) Build the script in Xcode.
a) Double-click the Xcode project and click New Run Script Phase under Build Phases for the target.
b) Open dsymUploader.sh in the script package, copy all content, and paste it to Run Script Phase.
c) Enter your project information in the run script.
Find the following parameters and their values in the configuration file: <your_app_id>: app ID; <your_client_id>: client ID of your project; <your_agcgw_url>: URL of AppGallery Connect; <your_collector_url>: URL of HUAWEI Analytics; <your_client_secret>: client secret of your project, which can be obtained under Project settings > General information in AppGallery Connect.
d) By default, the symbol file is not uploaded in debug mode or when compiled using a simulator. To modify this, set the values of the following parameters to 1:
UPLOAD_DEBUG_SYMBOLS=1
UPLOAD_SIMULATOR_SYMBOLS=1
3) The symbol file is then automatically uploaded to AppGallery Connect each time the Xcode project is compiled. The log information is as follows:
Manually Uploading the iOS Symbol File
1) First, locate the dSYM file. Go to Products in Xcode, right-click xxx.app, choose Show in Finder, and locate the generated xxx.app.dSYM file.
2) Right-click the xxx.app.dSYM file and choose Show Package Contents. In the Contents/Resources/DWARF/ directory, find the file with the same name as your app, and compress the file into a ZIP package. Then sign in to AppGallery Connect, click My projects, click your project card, and select your app. Go to Quality > Crash > Mapping file > iOS symbol files, and click Upload file.
3) You can click View upload records to view upload records or delete a specific file.
Top comments (0)