Everyone knows that we can't downgrade any iOS apps without a backup file (.ipa) of that App. Because of some reasons, such as critical bugs or lacking of features... sometimes we may want to downgrade our iOS apps. For me, I always use TimeMachine on my Mac, so I can access IPA from my backup. However, most of the users don't backup their stuffs. That's why I write this tutorial, with the following steps, you can download any versions of specific iOS app.
This tutorial is for Mac OS X. However the app (Charles) is available on Windows, too. Anther method for windows is using an alternative app called "Fiddler", you can follow this tutorial (Chinese Only) to learn how to use Fiddler.
In this tutorial, I would demo how to download Facebook v1.0. Before we start, we should download and install Charles. As I mentioned above, you can use Fiddler (Free), however I can't run Fidder on my Mac, that's why I use Charles. Also, Charles is a commercial app, you can get trial for 30 days. If you need Charles very often or think it's very useful, you can consider to purchase it.
After we install Charles, just open it, the system may ask for your permission, so please enter your password. In next step, Charles may ask you to install a Firefox extension, which is useless in this tutorial. Therefore, you can skip that step. Next, delete Facebook in iTunes, because we would re-download it later. If we don't delete it first, iTunes won't show "Download" button in the next step.
Now, we should install cert of Charles Proxy. Please follow this instruction:
After that, open Keychain.app in your Mac, find Charles Proxy and press command + i on your keyboard. In the pop-up window, choose "Always Trust" and enter your system admin password.
Download App (First Time)
So, let's download Facebook from App Store. We need to re-download it for three times, I will explain more below.
When it starts, click "pause" as soon as possible, then click "Delete" on your keyboard twice to remove the downloading item from queue.
And then, check the left sidebar of Charles, you can find a item named pxx-buy.itunes.apple.com (xx is a random number), right click that item, and select "Enable SSL Proxying" and "Breakpoints"
Download App (Second Time)
Re-dowanlod Facebook app again. If iTunes shows that you are downloading that App, but you already deleted the task from queue, just switch to any other iTunes Store pages and back. When the download starts, it may shows that the certification is not valid, just click "continue" or something like that.
After that, Charles would show a window for multiple times. The first time is the request which we send to Apple, so click "execute" to let it run. However, when the windows shows again, we should check the data, because it's the "response" from Apple server. So, as the following picture, we choose "Edit Response", and select "XML Text", then scroll down. You can see some version numbers like that, that's what we want. However, we can't get the "real" version number from these numbers. The only thing I know is that the larger number indicates newer version. So, to download a specific version of an app, you may need to try for many times in this step. Another things is that on iOS 9, there's a new feature called "bitcode". With bitcode, an app with same version may have multiple build numbers. So it's more difficult to get the number that you want. All you can do is trial and error.
Anyway, choose a version number you want in this step, and then click "Abort" to abort the downloading task.
Download App (Third Time)
Yes, we need to download the app again. In this step, we need to edit the "request" instead of "response". So, when the window of Charles shows, change the version number to the number that you found in the previous step. Then click "Execute" until the task finishes. (Or you can just click "Breakpoints" again to cancel)
Finally, check the app that you downloaded!!
If your friends or any other people have the specific version of the app, they can help you get the version number easier. Just ask them to unzip the IPA file (You may need to change the file name from xxx.ipa to xxx.zip), then open iTunesMetadata.plist from any plist editor. (Or you can download TextWarangler from Mac AppStore to open plist!) Find "softwareVersionExternalIdentifiers", from the list of softwareVersionExternalIdentifiers, check the largest number, that's the number you need. Because app that you downloaded won't sync the version number from Apple's server, the version number in IPA file always is the number of that version!
You can use any archive management application (WinRAR, BetterZip ...) to open the .ipa file, and then remove iTunesMetadata.plist, and save it. The modified application won't be upgraded automatically by AppStore on your device.