Reputation: 9092
I updated Xcode 7 and write some new code. The problem is that my app support iOS 7.1, that require run from Xcode 6.4 to run iOS 7.1 simulator. But I can not run the app from Xcode 6.4 any more, because there's some new coding syntax that is only run from Xcode 7. How can I debug my app for iOS 7.1. Thank you!
Upvotes: 2
Views: 942
Reputation: 5378
Xcode 7 doesn't have any code syntax. That's the iOS version. And If you are using any new API, your app will crash on lower versions.
Before using the newer API calls on existing framework objects, you may want to check respondsToSelector:
on the object to avoid crashes. And you need to have a fallback method for lower API versions.
But if you are using iOS 9 only frameworks, Contacts framework for instance, you need to check the device's iOS version before using the framework to avoid crashes.
Upvotes: 0
Reputation: 23623
Build your app in Xcode 7.
Quit Xcode 7.
Open up Xcode 6.4.
Launch the Simulator.app from Xcode 6.4
Run 'sudo xcode-select -s /path/to/Xcode-6.4.app'
Run 'xcrun simctl install booted /path/to/the/built/simulator.app'
Your app should be visible in the iOS 7.1 sim.
Upvotes: 5