2.7 KiB
2.7 KiB
How to catch crash on ios use xcode
Overview
Sometimes, we can't reproduce crash with local dev build, probably because your built version differs from the one QA team used. The QA team mostly used the PR build version. In this guide we will try to make a build as close as possible to the PR build for iOS.
You may notice various configuration files starting with .env (such as .env, .env.e2e, .env.jenkins) in the project. The usage of these files and environment variables injected at build time on CI will not be covered in this guide.
This guide covers how to configure Xcode to capture a crash stack trace with a physical iOS device. This allows debugging crashes by inspecting the stack trace. I will use issue #17255 as an example to reproduce and analyze a crash.
Prerequisites
- A physical ios device (simulator is not considered in this doc)
- Xcode installed
Steps
- Prepare Status Mobile
- Open Terminal, cd to project root
- Run
make run-clojure
in one tab - Run
make run-metro
in a second tab - Run
make pod-install
in a third tab
- Configure Xcode Project
- Update Code
- Reproduce Crash And Analyze
- Choose your physical ios device as target device and Run
- Follow reproduce steps from issue #17255 mentioned and xcode will halt at crash point
- Inspect stack trace to identify root cause. From the stack trace, we can locate the crash happened in
api/geth_backend.go:1048
(createTempDBFile) clearly!
Links
- changes to source code