IPhone - How to determine the target version of iOS to deploy an existing project

I have a huge iOS project installed by default for iOS 5.0. But I'm sure this is also 4.? compatible.

How can I find out the minimum version of iOS that my application can target without having to compare all the code by word with the iOS documentation in order to know for each method / constant / ... the version of iOS that was introduced, and at the end Do you know what minimal version of iOS I can configure? It will take weeks!

(Xcode doesn't help ... Setting the iOS target to something lower that iOS 5 never causes any warnings or errors when compiling, so I don’t know, for example, which methods are only available for iOS 4.2 when setting up the target version for iOS 4.1 ...)

+4
source share
2 answers

If you used any of the iOS 5 APIs, then the application will crash when this code tries to run on iOS 4.x, if you have not added any code to verify that the methods are available before calling them (look up "SoSelector answers:" in the documentation).

Set your deployment target for iOS 4.3. In the simulator, in the upper left drop-down list, he should offer you a choice of iOS 5 or 4.3 simulators. Select 4.3, then test the application carefully, if it works, you can check the console log to find the API intruder call and then figure out what to do with it.

If you do not see 4.3 in the assembly drop-down list, you should have 5.0 as the deployment target.

I suggest not setting the deployment target earlier than 4.3 unless you have a test device with an earlier OS that you can use.

So, the answer to your question: the deployment target should be the earliest version of iOS that you can test the application on (either with a simulator or with the actual device), unless you rely on the API in later versions of the OS and cannot get around them .

+2
source

In the build setup of your goal, you can find the deployment target. This will give you information about the minimum version of iOS for which this application was developed.

0
source

Source: https://habr.com/ru/post/1394984/


All Articles