How do I change my iOS applications' entitlements?
For a jailbreak app/entitlement, you need to do something like this. First, create a file named entitlements.xml
(or whatever you like):
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.backboard.client</key>
<true/>
</dict>
</plist>
You can add more entitlements if you need. This example file just grants the app the com.apple.backboard.client
entitlement.
It doesn't really matter where you put this file. The key is:
- You will need to modify Xcode's
SDKSettings.plist
file, as shown here.CODE_SIGNING_REQUIRED
should be set toNO
. - Do not code sign your app in Xcode. In Build Settings, make sure the code sign identity is set to Don't Code Sign.
- After you then Build your app for the iOS Device (not Simulator!), then go to the directory on your Mac where the output files are located. For an app named
HelloWorld
, you're looking for theHelloWorld.app
folder. It can differ depending on your configuration, so I won't bother trying to tell you where that is. If in doubt, use the command linefind
command. - Download
ldid
pre-built from this location, or as source from here. - Copy the entitlements.xml file into the same directory as where
HelloWorld.app
is. (Note: you don't have to have it here ... if you put it somewhere else, just adjust the command line I show you below). - Change directory to the directory where your entitlements.xml file is.
- Fake code-sign with this command:
$ldid -Sentitlements.xml HelloWorld.app/HelloWorld
After that point, you'll need to transfer the entire HelloWorld.app folder to install the app on your device. There's many ways to do that, and it sounds like you already have a way.
I have this whole process setup with a script, to make it easier.
Note: I am not stating whether or not this entitlement is the correct entitlement to use for the BKSDisplayServicesSetScreenBlanked()
call on iOS 6. I haven't tested that. I do know that this entitlement works to allow you to use SBDimScreen()
on lower iOS versions. But, this answer is just a description of how to add this kind of entitlement for a jailbreak app.