If you make your iPhone application universal, can you cancel it in a future version?

I made a universal application for iPhone / iPad (I switched only from iPhone), but in a future version I am going to switch mainly to iOS 4 functions.

As for the next update to my application, can I only update the iPhone version?

+4
source share
2 answers

You will need to update both applications as they are combined into one separate file. However, using conditional coding (for example, if !(UIUserInterfaceIdiom() == UIUserInterfaceIdiomPad) { - note that I always check the iPhone / iPod Touch in the same way as on OS 3.1.3 or lower, it will not return anything), you You can make only the iPad version different.

As for reversing, making it Universal - go to your project settings and goals and change the "Target application" on your iPhone or iPad. The option to update your goal should appear again.

0
source

Since the iPad is running iOS3.2, your code should handle both.

 if ([[UIDevice currentDevice].systemVersion isEqualToString:@"4.0"]) { [self doOs4Stuff]; } else { [self doOs3Stuff]; } 

Although you should be careful using specific API 4.0 when loading classes using tricks like NSClassFromString() to prevent it from crashing in older versions of the OS.

In my example, it would be possible to use a more reliable version check, it can analyze the string to check if, for example, the main version is "4" or "3".

+1
source

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


All Articles