iOSOpenDev
iOSOpenDev copied to clipboard
An extended Xcode build system for jailbroken iOS devices
iOSOpenDev—iOS Open Development
- Copyright (c) 2012-2013 Spencer W.S. James (Kokoabim).
- Copyright (c) 2019- Matt Clarke (Matchstic).
iOSOpenDev allows you to develop tweaks and other jailbroken utilities using Xcode.
Dependencies
-
theos
: to handle stuff like pre-processing Logos syntax. -
simject
: to run tweaks in the iOS Simulator
Installation
- Make sure you have installed and setup
theos
on your machine - Clone this repository to
/opt
The end path for e.g.install.sh
should be/opt/iOSOpenDev/install.sh
-
cd
to it - Run
git submodule init && git submodule update
- Run
./install.sh
(see options below to e.g. specify wheretheos
is installed) - For future ease of use, its a good idea to make
/opt
writeable for your user account without usingsudo
.
NOTE: if you run the script more than once, that may fail when copying SDKs. Try clearing the ones in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
(NOT the most recent one, or the symlinked one), and try again.
./install.sh
options
Option | Result |
---|---|
--theos= |
Sets the path where theos is installed. Default: /opt/theos |
--no-simject |
Skips simject as part of the installation procedure |
--patch-simject |
(Re-)patches available iOS simulators after installing a new one |
--patch-xcode |
(Re-)patches Xcode for open development (required after Xcode updates) |
Handling Xcode updates
Whenever you update Xcode, the new SDK needs to be patched, and the old ones to be moved into place. Simply run the following to do this:
./install.sh --patch-xcode
You may also need to patch any new iOS simulators. Use the following to do this:
./install.sh --patch-simject
Usage
- To create a new project, use Xcode's
File -> New -> Project
option. Then, scroll down toTemplates
in theiOS
tab. - To compile a project, use Xcode's
Product -> Build
. Executables built can be found via the auto-generatedLatestBuild
symlink. - To build a
.deb
, use Xcode'sProduct -> Build For -> Profiling
. Built packages are found inPackages
. - To change version numbers of a built package, modify
PackageVersion.plist
.
Known issues
When you create a new project, you'll need to adjust the deployment target to <= 10.3
if you're targeting armv7
. This is to avoid Xcode complaining that iOS 12 and higher don't support 32-bit targets.
iOS Simulator
Right now, running tweaks in the iOS Simulator isn't super smooth. You need to do the following:
- Change the value of the
SIMJECT
flag in your project settings toYES
. - Add the following to the top of your
.xm
file:
%config(generator=internal);
- Start an iOS Simulator (
Xcode -> Open Developer Tool -> Simulator
) and wait for it to finish starting up - Copy the
.plist
sitting alongside yourdylib
to/opt/simject
(temporary workaround, needed only the first time) - Compile your tweak again targeting an iOS Simulator
Troubleshooting
For the arm64e ABI to be handled correctly, you MUST use an SDK that has been patched such that ENTITLEMENTS_REQUIRED=NO. Otherwise, building will fail during codesigning.
Authors
- Follow @kokoabim
- Follow @_Matchstic