Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgraded app to iOS 7 - error "Auto Layout on iOS Versions prior to 6.0" (but want iOS 7 not older)

I have an iOS app that worked well on all devices in iOS 6.

I recently upgraded my xcode to version 5.0 and tried to build the same app for iOS 7 on an iPhone 5.

On building the app, the xCode upgraded something in the code settings, but failed to build with errors.

On the iPad XIB, I get an error : "Illegal Configuration : Auto Layout on iOS Versions prior to 6.0".

I tried enabling and disabling the "Use Autolayout" checkbox in the File Inspector, but it didn't work.

Please help me fixing this issue.

like image 282
metsburg Avatar asked Sep 11 '13 08:09

metsburg


5 Answers

Your problem is that the "Deployment Target" for your project is "5.0" and you are using a feature that isn't available for iOS 5.

Check the "General" tab for your build target

enter image description here

and update it to at least 6.0 to use Auto Layout

enter image description here

like image 166
David Rönnqvist Avatar answered Nov 18 '22 08:11

David Rönnqvist


In your .xib file in Xcode 5, click on the offending control. Go to the properties menu on the right and click on the "File Inspector" tab. It is the tab that looks like a sheet of paper. On that tab, there is a section called "Interface Builder Document". Make sure "Builds for" property is set for "iOS 6.0 and Later". If none of the other fixes above have worked, this is likely your culprit.

like image 41
Christine Avatar answered Nov 18 '22 06:11

Christine


There is very simple fix. You have just to uncheck "Use Auto Layout" in General tab. More information http://shreekantpawar.com/2012/12/20/simple-solution-to-auto-layout-on-ios-versions-prior-to-6-0-error-in-mac-osx-10-7-and-later/

like image 45
Anton Sivov Avatar answered Nov 18 '22 06:11

Anton Sivov


Assuming you are actually targeting only iOS 6.0+, it sounds like an issue related to upgrading Xcode. Sometimes, things can go awry when transitioning to a newer Xcode version.

Here are some general tips you can try:

  1. Clean the project (press Cmd + Shift + K)
  2. Reset the simulator (iOS Simulator menu item -> "Reset Content and Settings")
  3. Restart Xcode
  4. Try building again, hopefully you can now
like image 7
JRG-Developer Avatar answered Nov 18 '22 06:11

JRG-Developer


Autolayout is a feature of iOS6.0 and later, If you need to support iOS 5, don't use auto layout.

https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS6.html#//apple_ref/doc/uid/TP40011812-SW1

Please go through above doc, and check "What's new in iOS6.0" and serach for "Auto layout"

https://discussions.apple.com/message/19879144#19879144

like image 1
Gaurav Borole Avatar answered Nov 18 '22 06:11

Gaurav Borole