how do I get the SDK version for an app running on the simulator programmatically?
- by newbiez
I am trying to get the version/build that is running on the simulator via code.
Basically I am checking various features of my app using the simulator, and want to switch code paths on and off based on which SDK do I have set as current, instead than doing it by hand every time (my testing machine has different version of the SDK on it and I switch the current for testing purposes between 4.1 and 5.1).
So the idea is that when the app launch on the simulator, I can read the build of the SDK and know trough matching (I have a function that does the matching and turn on and off the features) if I should run a specific code path or not.
I know how to figure out if I am running on the sim or on a device, but cannot find references about how to get the version of the SDK via code, so I am basically stuck.
Is there any function that I can call and that returns me the build or version of the currently installed iOS, while I am running the app on the simulator?