Finding unsupported apis with os version

I developed an application for the iPhone. It works fine on os4, but it doesn't work on os3.1. Actually works, but there are some problems; After the screen saver, the screen will appear. while I am leaving the application, I see that the application opens successfully, but just seeing that it exited.

So, I wonder if there is a tool that says apis has problems with os3.1? Therefore, I have a chance to replace them.

+4
source share
3 answers

Install the base project SDK on iphone-os-3-1, then build. All error messages about classes, methods and functions that do not exist should indicate things added after iphone-os-3-1, since your project is built and bound to the iphone-os-4-0 SDK.

If you do not have an SDK for iphone-os-3-1, try this instead:

  • Open the project settings.
  • Find the "Preprocessor Macros" option.
  • Edit and add __IPHONE_OS_VERSION_MAX_ALLOWED=30100

Now try to build. This should lead to the fact that everything that appeared after iOS 3.1 is marked as inaccessible leads to the same errors as when switching to the iphone-os-3-1 SDK.

+1
source

If you want to test a specific API, just run it in your code somewhere with the appropriate answer. For example, to see if printing is supported, run this ...

 if (NSClassFromString(@"UIPrintInfo")) { } 
+1
source

It is a good idea to get a second Xcode installation for this situation, in which case you will need 3.2.1 with the SDK 3.1.3. I would like to help you with the download link, since it is no longer displayed on Apple, but I have googled in the past and found direct official download links that will work as long as you are logged in to your developer account, so good luck.

The annoying bit is that you need to go through the project files and set the “Base SDK” to 3.1.3, and then return after completing the exercise. But this is the easiest way to indicate what you cannot do in 3.1.3. "sudo rm -rf" (I'm nervous even typing) is a great way, but you need to understand what might be safe and what might not be before you implement it, or you will get a 10x code that is sized should be.

Apple really needs to deal with this problem - I hope by marking the methods that are before your specified "Deployment Goal" in the same way as the marked methods.

0
source

All Articles