Solved

Making an iOS application compatible with iOS6 and iOS5

Posted on 2013-02-04
5
522 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 19

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 19

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 19

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

What's a UDID? If you're involved in developing, testing, or even reviewing an iOS application that's in beta, then at some point you may need to know the UDID for any iOS devices that you'll be testing on. What's the UDID? It stands for Unique Dev…
     Intro      In this article, I will show you how to parse a JSON in Swift using an open source library called SwiftyJSON (https://github.com/SwiftyJSON/SwiftyJSON). If you haven't heard of a JSON before, it stands for JavaScript Object Notation…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now