Technical Q&A QA1764

How to reproduce bugs reported against App Store submissions

Q:  I have reports of a bug in an app I submitted to the App Store, but I can't reproduce it with Xcode. How can I build my app so that it matches the App Store version and reproduces the issue?

A: To reproduce a bug that App Review or your users are seeing you need to be sure that you are testing the exact build of the app that you submitted to the App Store.

If there are bugs or undefined behavior in your code, compiler optimizations may cause the app you submitted to the App Store to behave differently than any test builds made with different build settings.

Using Xcode's Archive feature, you can be sure you are testing the exact same build of your app that you plan to publish to the App Store.

To create an Archived build that you can both test and submit:

1) In Xcode choose "Archive" from the "Product" menu to archive a build of your app. You can find the archive in the Archives tab in the Organizer window.

2) Package the build as an "Ad Hoc" .ipa file by selecting it in the Organizer window and pressing "Distribute…"; then select "Save for Enterprise or Ad-Hoc Deployment". Choose any "Code Signing Identity:" that will let you install on your test device.

3) Delete any builds of the app from your device. Then test the build by opening the .ipa file with iTunes and syncing to your device to install it.

It is best to install your app with iTunes and launch it without Xcode for quality assurance testing. Xcode's app install process is optimized for development, but is slightly different than how iTunes and the App Store's install apps. This is good during development because it's faster, but it can mask issues with your app. Running your app with Xcode attached also masks problems like "watchdog crashes" that can happen if an app takes too long to launch.

Next Steps

If a problem only reproduces in an Ad Hoc build, you'll need to analyze Crash Logs and Console output from the device to debug it. Debugging Deployed iOS Apps explains how to gather this information. See Understanding and Analyzing iOS Application Crash Reports and the Understanding Crash Reports on iOS WWDC Session for tips on interpreting it.

After testing an archived build to your satisfaction, you can submit it to the App Store, by following these steps.

If you are still unable to reproduce a crash, follow the steps in How to Match a Crash Report to a Build to verify that you are testing the build that exhibited the crash. If you follow the steps in this document, the .ipa you test will have the same build UUID as the app you submit to the store.



Document Revision History


DateNotes
2013-04-02

Editorial update.

2013-01-10

This document was previously titled, "Testing Workflow with Xcode's Archive feature".

2012-05-22

Added more troubleshooting information.

2012-03-20

New document that describes how to build and archive your app in order to reproduce issues only seen after submission to the App Store