Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 539
  • Last Modified:

Making an iOS application compatible with iOS6 and iOS5

Hi.

I'm making an app for iphone. I want to be compatible with ios5 and ios6. Is this possible? If so, can I makde the ios6 be the preferred compilation?

Thank you.
0
gplana
Asked:
gplana
  • 3
  • 2
1 Solution
 
darbid73Commented:
ios6 introduced some pretty new things.  One major one being auto layout.  It is NOT backwards compatible so if you want to target 5 and 6 you will have to use the old method.

in xcode you simply say you want to target 5 and that is all.  

I am not sure there is a preferred compilation.  If somebody downloads your app then the code will always do the same thing.  Thus the reason why if you want 5 compatibility you will not be able to use features in 6.
0
 
gplanaAuthor Commented:
Thank you.

What is exactly auto layout ? Is it configurable on Xcode?
0
 
darbid73Commented:
The old way to set out a UIView was to code in a size and position i.e.. Frame.  Then you set up springs and struts to say what happened when the size of the superview changed.

In autolayout you do not set your frame at all.  You just say how the UIView should act with regard to something else (normally a superview) then ios sets the frame.

Apple Docs, note it came from OSX so this doc is for both.

A tutorial.  Note the second picture with the red rectangle.  This answers your question about how to turn it on and off.  If you want ios5 you must turn it off.  If you leave it on then an ios5 device will simply crash.
0
 
gplanaAuthor Commented:
Excellent. I can see "Use Autolayout" checkbox already unchecked, so it should work on every device. I also don't change anything if user changes the orientation of his device, so no problem here (my application is a single orientation application).

Thanks for your help.
0
 
darbid73Commented:
Hey just remember that there could be other things as well.  It is just Autolayout was a big thing.  You should always test it with the ios5 simulator.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now