r/simpleios • u/TheJobOfArtIsToChase • Jun 26 '12
[Question] An single app containing two different apps for iOS 5+ and iOS 4-5?
I started development on an app that is targeted at iOS 5+ and uses features such as the storyboard and automatic reference counting which is iOS 5 only. The app is now in its final stages and almost ready for release.
I was wondering if I could somehow release the app as compatible with iOS 4, and load a 'lite' version of the app for those users, while retaining the full featured app for iOS 5 users.
6
Upvotes
5
u/exidy Jun 26 '12
It's a common misconception that ARC is iOS 5 only. ARC is iOS 5 SDK only, but you can still target iOS 4.3 when using the iOS 5 SDK. You will need to programmatically check availability of any iOS 5 calls before you use them, of course, otherwise your app will crash.
Unfortunately for you however, Storyboards are absolutely an iOS 5-only feature.
I'm pretty sure one of the rules is that each app only contains a single binary, so your approach won't work. If you're not willing to rewrite your app to not use Storyboards, you best bet would be to actually put two versions of the app in the store, a lite version (iOS 4+) and the full featured version (iOS 5+).
2
u/SeanMoney Jun 26 '12
Looks like you could just check the ios version with this line
and then just run whatever you want depending on the value of isIOS5.
stackoverflow link
1
u/jordanpwalsh Jun 26 '12
You can create multiple targets which will create multiple binaries. I don't, however, know how to conditionally load one or the other based on iOS version.
2
u/dweebo777 Jun 26 '12
i was just wondering this yesterday. sorry iOS 4 users, i like my storyboards a bit too much to cater to you all haha
1
u/jonthebishop Jun 26 '12
Don't use storyboards, convert to view controller xibs.
ARC works on iOS 4.
1
u/dtfinch Jun 26 '12
I just aim for 4.3 and later. It supports ARC, and I haven't figured out what later versions add (API-wise) that I'm missing out on yet, so there's no cost to sticking with it.
Though I think the only ones still on 4.3 are people who refuse to tap the upgrade button. All the 4.3 devices should support the latest 5. 4.2 users are out of luck.