简体   繁体   中英

Only crashing on Testflight

We're using TestFlight to send out pilots of our app.

There's a part of the app that is crashing, and we had a lot of trouble reproducing the crash. The code their is fairly simple.

It turns out that the users who got the App via TestFlight get the crash, while if you build the app and install it using the IDE it doesn't crash!

Anyone have ideas about what might be causing this?

Any ideas for workarounds? We don't want to stop using TestFlight.

Make sure to build your app in Release Mode not in Debug. The app may only crash when in Release.

The first thing I'd try is to map the crash stack trace to function names in your application. This may yield useful insight into the nature of the crash:

  1. As soon as a crash is reported request the crash log. This can be obtained through Xcode's organizer or if that's not an option it can be screen-captured from the iPhone's Settings -> General -> About -> Diagnostics & Usage -> Diagnostic & Usage Data. Scroll to the app name or the section LatestCrash-AppName.plist.
  2. Although you can in theory symbolicate a crash, I find the procedure described below a foolproof way to get symbols from the stack. Convert all stack addresses for the crashing thread into method names.
  3. Optionally request the iDevice syslog. This may include assertion failure messages which are also invaluable. Note that this should be done as quickly as possible as the syslog only holds so many entries before they get dropped. You can use the Organizer or the cmd line idevicesyslog to obtain this.

Manual symbolication: This will work as long as your builds have debug information.

  1. Obtain the _exact_same_ .ipa that crashed. If you didn't save it you can download it from the device by using iFunBox or the cmd line ideviceinstaller utility.
  2. Unzip the .ipa
  3. Run the following command on the executable file (Payload/AppName.app/AppName):

    otool -tv AppName.app | c++filt > listing.asm

  4. Wait while the previous step completes (may take a while). The generated listing.asm file will be several megabytes long.

  5. Using an editor that can handle large files search listing.asm for the addresses listed in the stack trace. Note that the addresses may be a few bytes off (usually pointing 3 or so bytes ahead). Also, addresses that aren't found in listing.asm indicate addresses in iOS libraries. Ignore those for now.

Of course, if you're able to symbolicate, you can skip this procedure.

Good luck debugging!

We had a similar problem. The issue with us was static libraries. When we built the app from scratch and went to testflight, it was crashing but from the IDE it wasn't. The crash was because the static libraries did not get included when doing a build, but was getting included if I connected the iPad direct and used XCode to install.

A simple test will prove this:-

1.) Instead of building from IDE, create a .app file and then load it via iTunes and check if you are getting the crash.

We worked around this by creating the .iPA manually, that is creating the .app then making a Payload folder and putting the .app in it along with the info.plist.

Then things began to work in Testflight as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM