So, iOS 7 was released and a lot of our users have already upgraded, even though we officially do not support iOS 7 and have asked everyone not to upgrade. Right now the app runs in compatibility mode and there are lots of issues being reported by our users. The problem is that I do not know how to debug in compatibility mode, so some of these issues are really hard to fix. I tried to Google for it, but so far I've had no luck.
How can I debug an app on iOS 7 in compatibility mode?
I figured out a way to do it. This is what I did:
- Install Xcode 5 from App Store. (Skip this step if it's already installed.)
- Make sure you can deploy to your iOS 7 device from Xcode 5.
- Download Xcode 4 from Apple.
- Open the dmg.
- Drag Xcode 4 to some other location than Applications, e.g. Documents.
- Rename that copy to something other than Xcode, e.g. Xcode 4.
- Drag the renamed copy to Applications.
- Start Xcode 4 and deploy to your iOS 7 device.
- The app is now being debugged in compatibility mode on iOS 7.
These are the steps that I used and they worked for me. I'm sure there are other variations that will work. The key seems to be to have Xcode 4 and 5 installed side by side. Maybe you can even uninstall Xcode 5 afterwards, but I didn't test this, since I primarily use Xcode 5. It seems like Xcode 5 enables deployment to iOS 7 and after it's enabled Xcode 4 is also able to deploy to iOS 7.
来源:https://stackoverflow.com/questions/18959986/how-to-debug-app-in-compatibility-mode-on-ios-7