Solved

Making an iOS application compatible with iOS6 and iOS5

Posted on 2013-02-04
5
526 Views
Last Modified: 2013-02-05
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
Comment
Question by:gplana
  • 3
  • 2
5 Comments
 
LVL 20

Expert Comment

by:darbid73
ID: 38852811
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
 
LVL 15

Author Comment

by:gplana
ID: 38853189
Thank you.

What is exactly auto layout ? Is it configurable on Xcode?
0
 
LVL 20

Accepted Solution

by:
darbid73 earned 500 total points
ID: 38853206
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
 
LVL 15

Author Closing Comment

by:gplana
ID: 38854098
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
 
LVL 20

Expert Comment

by:darbid73
ID: 38854221
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iPhone backup extractor 3 63
Can't transfer contacts in my iPhone to Outlook 23 48
iPhone notifications disappear when I unlock 5 26
iPhone 7/ HDMI 6 26
There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
Email is way too noisy, prone to hiding the important stuff, and really becoming unreliable for critical/timely communications. There are better ways to communicate.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question