Support from iOS 4.3/ iOS 5 onwards - ios

I am planning to use different storyboards (one with and another without autolayout) because I need to have my app from 4.3 to 5.0(without autolayout) and 6.0 onwards (with autolayout) but I cannot build it on my device as I'm failed by
Illegal Configuration: Auto Layout on iOS Versions prior to 6.0
I don't think I should disable my storyboard autolayout as I got another storyboard to cater the old devices.
How do I able to manage this?
Note: regarding why I need to support the iOS 4.3 / 5, I cannot make the decision as my business management made that decision. If I support iOS 5 onwards, is there a way to counter for this?

Related

Can UIStackView support iOS 8 or 7?

I know that UIStackview is a new feature in iOS 9. If I want my app to support iOS 8 or iOS 7, does that mean I shouldn't use stack views?
It looks like it's for iOS 9+.
UIStackView
Availability
Available in iOS 9.0 and later
UIStackView is only available in "iOS 9.0 and later".
If you need to support earlier versions of iOS, check out OAStackView, a drop-in replacement which "implements most of the features from UIStackView" and supports iOS 7+.
A few minor features haven't been finished yet. I tried it out using the UIStackView-Playground project and it works pretty well.
You could also check out MarkupKit (I'm the project's author):
https://github.com/gk-brown/MarkupKit
The LMColumnView and LMRowView classes are very similar to UIStackView but work with iOS 8. They also have a couple features that UIStackView doesn't have, such as the ability to set a background color and weight-based distribution.
See this article for more information:
https://gkbrown.wordpress.com/2015/09/29/using-uistackview-with-markupkit/
UIStackView is supported only in iOS 9+. For people looking for a backport to iOS7/8:
https://github.com/oarrabi/OAStackView

how do i upgrade ios7 universal app to xcode 6 based universal storyboard app?

i currently have a xcode 5 (ios 7) based universal app (hence two storyboards) and I am thinking of updating it to ios 8.
Is there a way / best approach to migrate the two storyboards into a universal single storyboard?
I cant see a convert option in xcode 6.

How to upgrade your project for ios 3.0 to ios 6.0 onwords

Right now I am working on non-arc project for ios3.0. They haven't designed anything by interface builder. Everything coded is both for landscape view and portrait view separately. My Problem is when I try to add the same image for background of another screen, it appears to be cropped. also enabling the auto resize subviews gives me error. When I try to set views for portrait and landscape view, it doesn't work.
one more thing, that project is only developed for iPad. if they want it to be done for iPhones, should i have to start from scratch separately for iPhone because of above mentioned problems ?
please suggest me if the upgraded app will support for 64 bit ipad retina.
Thanx in advance
Make your project universal by changing the setting shown in the image below. Also it is better to drop support for iOS 3 as nobody uses it anymore and support iOS 6 and above. It will give much more options and flexibility regarding frameworks and layouts.
To support 64-bit devices you have to build with iOS 5 or higher as minimum supported iOS version. Best practice is to support the two latest releases (iOS 6 and 7 at this moment) as most iOS users update their devices fast after each os release.

Why does autorotation happen in iOS 6 but not iOS 5?

I have a general question to iOS 6 and AutoLayout in the Simulator.
My app is targeting iOS 5 and iOS 6 as well. I need to switch-off AutoLayout in StoryBoard otherwise the app is crashing in the iOS 5 simulator (since AutoLayout is supported first with iOS6).
But when I start the iOS 6 simulator all views are rotating and all subviews are resizing accordingly. Using iOS 5 simulator all views doesn't rotate with changing the device orientation.
Would that happen on real devices as well? So, even with switched-off AutoLayout option in Storyboard would all the views rotate with the device orientation with iOS 6 and better on a real device?
Thanks!
Apple changed how autorotation works in iOS 6.
If you create a project in Xcode 4.6, Xcode sets it up to use the iOS 6 autorotation API. The project template allows portrait, landscape-left, and landscape-right orientations (and upside-down portrait in an iPad app). So when you run the app on iOS 6 (device or simulator), the app allows interface rotation.
When you run that project on iOS 5 (on either the simulator or the device), the system ignores the iOS 6 autorotation API and looks for the shouldAutorotateToInterfaceOrientation: method on your view controller. Since Xcode 4.6 didn't create that method (and presumably you didn't add it), the system uses the default implementation, which is only returns YES for portrait orientation. Thus on iOS 5 you don't get any interface rotation.
The simple solution, if you don't want interface rotation, is to go to your target's Summary and turn off the landscape orientations.
You can learn more from several official sources:
The “ Handling View Rotations” section of the UIViewController Class Reference.
The “UIKit” section of the iOS 6.0 Release Notes.
“The Evolution of View Controllers on iOS” video from WWDC 2012.
Like #Patrick Tescher said, you can't use Auto Layout in iOS 5.
You should also consider the fact that only 6% of the users have iOS 5, as of June '13. At the same time, iOS 6 adoption is at 93% (source). This is a very high number. So depending on your situation, perhaps you don't have to make your app iOS 5 compatible in the first place. Spending twice the development time on a feature to make it work for 6% users may not be the best use of one's time. Unless it's a business decision and you get paid in either case :)
If you want to support iOS 5 you should not use auto layout. Auto layout is only supported in iOS 6 and later.
You can technically have two storyboards and load one for iOS 5 and one for iOS 6 but you would be duplicating a lot of work. Best to just hold back on Auto Layout until you can remove iOS 5 support.

Can an application that uses a storyboard be deployed in an iPhone not running on iOS 5

The storyboard is a very powerful and easier way to build iOS apps. But I just want to know if apps made using them will work on iOS earlier than 5.0. For example, will it work on iPhone original or iPhone 3G
If it will not, to be able to run it on all iOS versions, do I just use the old method (I mean nibs and programmatically creating MVC)?
Short answer is: no.
Storyboard is a iOS 5 or later technology. It will work on any device running iOS5. Apps using UIStoryboard will not work on iOS 4 or iOS 3.
You should think of it in terms of iOS versions and not physical devices, although, obviously, any device not capable of running iOS 5 won't be able to use UIStoryboard, either.

Resources