Skip to content

Instantly share code, notes, and snippets.

@minif
Last active June 29, 2024 03:55
Show Gist options
  • Save minif/473310d7c556caadf4f2ed2d97389574 to your computer and use it in GitHub Desktop.
Save minif/473310d7c556caadf4f2ed2d97389574 to your computer and use it in GitHub Desktop.

Download .ipa files removed from purchased tab.

Due to unknown reasons, apps you had previously purchased can no longer be downloaded from the App Store or iTunes. However, it turns out these applications can still be accessed. Originally, this tutorial was written to use iMazing's app downloading feature. This is because iMazing downloads apps using a different endpoint from what iTunes uses. However, I have also decided to write the tutorial to use ipatool-py, because it also uses the different endpoint when entering the Apple ID and Password into the command line.

This app must have been purchased on your Apple ID beforehand. You cannot download any app ever made. Apple only lets you download apps you had bought or downloaded in the past.

I reccomend using the ipatool-py method, because it is easier. However, if you are unable to use it, I have left the original iMazing method for you to follow.

Requirements for this tutorial:

  • App ID (Number such as 1053533457) of app to download
    • The app you would like to download must have been previously purchased on your Apple ID
    • You must be able to access the Apple ID

Using ipatool-py

  • ipatool-py
    • git clone https://github.com/NyaMisty/ipatool-py.git, or click "Code", then "Download ZIP", and then extract the downloaded zip.
    • If you would like to download older versions of removed apps, use this fork until the changes are merged into the main version.
    • Python must be installed.

Using iMazing Method:

  • iMazing (Windows or Mac)
  • Plist editor (ProperTree is free and cross platform, requires Python)
  • Any iOS Device (iMazing requires an iOS device to access the application manager)
  • Lightning (or 30-pin connector) to connect the iOS device to your computer
  • Any app installed on the iOS device.

Finding the App ID

The easiest place to find an App ID is to find the original iTunes link.

https://apps.apple.com/us/app/color-switch/id1053533457 (The number after /id is the App ID).

  • Search engines such as Google often still have the app's iTunes page as a result
  • News articles and Review sites can have a link to view the iTunes page
  • Reveal trailers and promotional media will contain a link to the iTunes page

You may also request your personal data from Apple to find the ID.

  • Make sure to select "Apple Media Services information" when requesting data
  • This can take about a week to get
  • Find it in Apple_Media_Services/Stores Activity/Account and Transaction History/Store Transaction History.csv or Apple_Media_Services/Stores Activity/Account and Transaction History/Store Free Transaction History.csv
    • The App ID is listed as an "Item Reference Number"

Downloading app using ipatool-py:

  • Before beginning, ensure that Python is properly installed.
  1. Open CMD (Windows), Terminal (Mac), or other command line intepreter of your choice
  2. cd to the cloned or extracted directory of ipatool-py
  • You may also type cd and then drag the ipatool-py folder into the window of the CLI to get the correct path.
  1. Run python main.py download -i appid -e user@icloud.com -p password
  • Replace appid with your apps App ID (i.e. 1053533457), user@icloud.com with your Apple ID, and password with your Password
  • On Mac, use python3 instead of python (i.e. python3 main.py download -i appid -e user@icloud.com -p password)
  • If you want to download older versions of apps, and you have the external identifier, add --appVerId evid
    • You can find External Version Identifiers by downloading the latest version, renaming to .zip, unzipping, and viewing iTunesMetadata.plist. Find it in a section called softwareExternalVersionIdentifiers. They will not be labeled, so you may need to use trial and error. This will be the evid
    • i.e. python main.py download -i appid -e user@icloud.com -p password --appVerId 833889087
  1. (If you have 2FA), Accept the 2FA prompt and append the 2FA code to the command you used in Step 3
  • i.e. if the 2FA code is 123456, you would run python main.py download -i appid -e user@icloud.com -p password123456
  1. The app will now download. It is located in the ipatool-py folder.

Downloading app using iMazing (Legacy Method):

  1. Plug your device into your computer
  2. Open iMazing. When prompted to back up your device, select 'Later'

step1

  1. Select "Manage Apps"

step2

  1. If prompted, sign into your Apple ID

step3

  1. After a moment, a list of applications installed on your iOS device will appear. Make sure the app you want to replace has a gray checkmark
  • Select the Library tab

step4a

  • If it has a green checkmark, right click and "Delete from Library"
  • While you are here, check if the app you would like to install is already listed. If so, download it and skip to step 12

step4

  1. Close iMazing. Make sure iMazing Mini is also closed.

  2. Open Apps.plist in your .plist editor of choice.

  • If using Propertree, double click the .bat (Windows) or .command (Mac) file, and select File > Open in the Menu Bar
  • On Windows, paste %appdata%\iMazing\Library into the location bar
    • If this does not work, paste %appdata%\Roaming\iMazing\Library (Some older Windows versions use this location instead)
  • On Mac, hold Command+Shift+G, and paste ~/Library/Application Support/iMazing/Library.
  • (Optional) Delete Apps.plist.backup.

step5

  1. Pick the app to replace (In this case, I chose com.adobe.Adobe-Reader). Modify:
  • storeID (Replace with App ID)
  • The name of the Dictionary (Optional, change it to something different)
  • bundleID (Optional, change it to something different)

step6

  1. Save the .plist and close. Re-open iMazing and re-enter "Manage Apps" (Step 3)
  2. The app you replaced should sync back, and a duplicate should appear. Download this duplicate.

step7

  1. After the duplicate is downloaded, exit the app manager and re-enter it.
  • On older versions of iMazing, the download will fail. This is only visual, the download actually did take place in the background.
  1. Your app should now appear, but it is missing important information. Click the trash can to delete it, and click the download button again.

step8

  1. You have now downloaded the delisted app. Right click and "Export .IPA" to save it to your desktop

step9

What to do with the .ipa file

The .ipa file on your desktop is an "encrypted" .ipa file. Like any other app downloaded from iTunes, it will only be usable on devices with your Apple ID. You may also choose to "decrypt" (or "crack") the app to remove this restriction and make it easier to archive.

Use this tutorial to crack the app on any legacy version of iOS.

Feel free to check out iOS preservestion projects such as iPhoneOS Obscura if you would like to archive old iOS apps.

About this tutorial

This tutorial was tested on OS X El Capitan and Windows 10 with iMazing 2.15.8.

@K4sum1
Copy link

K4sum1 commented Mar 9, 2023

If you use appspy.com to determine the ID for your app, you have to click the download on the app store button. It will redirect to an iTunes store page with the proper ID that works.

@cookiecookie711
Copy link

can you make a video on it so I can understand 100%? (I'm using Windows and a downgraded IPod touch 4G.

@szalony9szymek
Copy link

the tutorial is about as clear as it gets just follow the instructions lol

@upintheairsheep
Copy link

If you use appspy.com to determine the ID for your app, you have to click the download on the app store button. It will redirect to an iTunes store page with the proper ID that works.

Use AppAdvice as well

@vitito2002
Copy link

does the cracking of the IPA file cause any problems with the OS further into the future? I just want to know if it is safe to use and wont break my phone

@minif
Copy link
Author

minif commented Aug 14, 2023

does the cracking of the IPA file cause any problems with the OS further into the future? I just want to know if it is safe to use and wont break my phone

Cracking apps should not affect your phone in any way.
In order to crack apps though, you need to be jailbroken, which does have a small risk of losing your data, and can trigger jailbreak detection even after you remove it. I would recommend using a different device if possible. Also, if you are on the latest version of iOS it is very likely you can't jailbreak and crack apps anyways.

@EmptyEnergy
Copy link

so how can we download a different version of an app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment