iOS 5.1.1 Development on Xcode 4.3
Testing on real device without an Apple Provisioning Profile
After a two long days, today I was able to build and run an iOS 5.1.1 from Xcode straight to my device.
To do this you will need:
- Jailbroken iPhone, iPad or iPod
 - Appsync installed on device
 - Xcode 4.3+
 
Step 1: Create a new self-signed code-signing certificate using Keychain Access
- Open the Keychain Access application
 - Go to Menu "Keychain Access" -> "Certificate Assistant" -> "Create a Certificate"
 - Choose an unique name, easier to remember. You will need that name latter on.
 - Choose "Self Signed Root" for "Identity Type"
 - Choose "Code Signing" for "Certificate Type"
 - Check "Let me override defaults"
 - And then click "Create"
 - Click next to all following questions without changing anything
 
Step 2: Edit Xcode "Info.plist" file
- Open the file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist
 - Replace the three occurrences of "XCiPhoneOSCodeSignContext" by "XCCodeSignContext"
 - Save the file and restart Xcode
 
Step 3: Install Appsync
- Intall "Appsync" application from Cydia
 - Intall "SSH" application from Cydia
 - Log into your device via SSH and create a blank file called "tdmtanf" in "/var/mobile"
 
Step 4: Xcode Project Setup
- Open your project on Xcode
 - Go to "Project" -> "Build Settings" -> "Code Signing" -> "Code Signing Identity" -> Choose the identity related to the certificate that you created on step 1 on settings for debug and release.
 - Make exactly the same thing on "Targets" -> "Build Settings" -> "Code Signing" -> "Code Signing Identity"
 
Now you should be able to build and run your project from Xcode to your device.