Solved

Making an iOS application compatible with iOS6 and iOS5

Posted on 2013-02-04
5
528 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
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…

734 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