Skip to content

Instantly share code, notes, and snippets.

@bamtan
Created September 28, 2020 05:43
Show Gist options
  • Save bamtan/ee25d9799d43d21dc9670b8b943f7297 to your computer and use it in GitHub Desktop.
Save bamtan/ee25d9799d43d21dc9670b8b943f7297 to your computer and use it in GitHub Desktop.
How to combine a dylib and an IPA file so you can use a modified IPA on jailed iOS

Prerequisites

Prepare the IPA file

  1. Change the .ipa file extension to .zip & unzip it
  2. Open the Payload folder, right-click on AppName.app, then click “Show package contents”
  3. Open Info.plist in Xcode
  4. Find the UISupportedDevices row and delete it
  5. Determine the minimum iOS version your app requires and change the MinimumOSVersion row to reflect this (see below)
  6. Find the “Bundle identifier” key and remember its value (for example: com.spotify.client)
  7. Zip the Payload folder
  8. Rename Payload.zip back to AppName.ipa

How to find the minimum iOS version:

  1. Search for the app in the App Store, tap on it, scroll down to the “Information” section, and tap “Works on this iPhone”
  2. It will now say something like “Requires iOS 11.0 or later”. Type “11.0” into MinimumOSVersion

Compile the IPA

  1. Open Terminal.app on your Mac and type "$THEOS/bin/nic.pl"
  2. Choose "iphone/jailed"
  3. For “Project Name”, type the name of your app (for example: Spotify)
  4. For “Package Name”, type the Bundle Identifier from Info.plist (for example: com.spotify.client)
  5. For “Path to .ipa”, type AppName.ipa
  6. Type “open ./AppName
  7. Copy the “fixed” AppName.ipa into this folder
  8. Copy all of your dylibs into this folder
  9. If you have a .bundle, icon files, or other stuff, make a folder called “Resources” and put them inside
  10. Open Makefile in TextEdit
  11. At the very top, add this line: "AppName_INJECT_DYLIBS = TweakName.dylib". If you have multiple dylibs, simply list them all out with a space between entries (for example: "Spotify_INJECT_DYLIBS = Spos.dylib TrueShuffle.dylib")
  12. Change the AppName_IPA line to simply “AppName_IPA = AppName.ipa
  13. Delete the “AppName_FILES” line
  14. Go back to Terminal and type “cd ./AppName”
  15. Type "make clean all package FINALPACKAGE=1 CODESIGN_IPA=0"
  16. Done! Your final ipa is in the “packages” folder

You can install it with Impactor, AltStore, ReProvision, or Xcode + iOS App Signer

Note: People trying this with YouTube: sideloading with Xcode + iOS App Signer will change the bundle identifier of the ipa. Google checks the bundle identifier, and if it’s been tampered with, they won’t let you sign in to your Google account. To fix this, sideload with Impactor, AltStore, or ReProvision instead

People trying this with Cercube: you need to put /Library/Application Support/Cercube/Carida.bundle into the Resources folder. If you don’t, the ipa will crash every time you open it


Credits to /u/CaptInc37

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