Target Deployment Tool for iPhone Xcode

Problem

I'm currently stuck trying to figure out what to use the "Install iPhone OS" setting. I don’t want to write conditional code right now, so I need the lowest version that works fine with my application.

At first I thought it would be 2.0, since I did not use any 3.0 features, but then I realized that AVAudioRecorder is a 3.0 API. I don’t want to manually check EVERY function that I use in the documentation.

Question

Is there a tool that will check the availability of the OS for each function that you call in the code to figure out what the deployment goal should be? This tool may be a good old compiler, but the latest version of the iPhone SDK does not come with the PRE-3.0 SDK.

+3
source share
3 answers

There is a way to test the desired older iOS. For example: I installed sdk 4.1 and tested compilation for target 3.1. http://0xced.blogspot.com/2010/07/using-sdk-313-with-iphone-sdk-4.html

+4
source

There is no tool for this; testing on dedicated devices is the way forward.

Depending on what you want to do, conditional code based on the SDK version is probably a common task for iOS development. Not only because new APIs are appearing, but because Apple, unfortunately, is changing the behavior of these APIs on new iterations of the SDK. Therefore, I would not scare code forks if necessary.

+1

There is no such tool. It is best to check documents and test devices with different versions of the installed OS.

0
source

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


All Articles