28

Can anyone explain this warning?

Unsupported Configuration: This file is set to build for a version older than the deployment target. Functionality may be limited.

When my app was initially written a storyboard I tried was not supported. This made it necessary to manage multiple views entirely from code i.e. without using XIB files. So my app basically uses a MultiviewAppDelegate to switch between multiple views using a MultiviewViewController.

It was written initially under iOS 5 and now runs on the Simulator (9.2) using an iPhone 6 Plus running iOS 9.

OrdoDei helped me address a similar problem related to unused XIB files. My particular issue could be addressed if my app used storyboards. Most other problems with this particular warning seem to be related to networking which my app doesn't use.

Has anyone else had to deal with a similar issue?

Lucas
  • 523
  • 2
  • 10
  • 20
Greg
  • 1,750
  • 2
  • 29
  • 56

3 Answers3

52

Open the affected XIB files and ensure that the "Builds for" setting is set to your minimum deployment target and/or above.

enter image description here

M Katz
  • 5,098
  • 3
  • 44
  • 66
Shripada
  • 6,296
  • 1
  • 30
  • 30
  • Shripada (also @Ramani Ashish) - this window had 'Unknown iOS version'. If I select 'IOS 8.2 and Later' the warning drops out for 'MultiviewViewController.xib'. However a warning still remains for 'MainWindow.xib' – Greg Mar 03 '16 at 05:53
  • 1
    Shripada (also @Ramani Ashish) - duh. I had to make the same selection for 'MainWindow.xib'. Both warnings are gone. You're a gem. – Greg Mar 03 '16 at 05:56
  • 1
    Glad that it helped! – Shripada Mar 03 '16 at 08:54
  • Those settings can be found in MainStoryboard.storyboard. Look in the Utilities panel at your right. If you have an old App that use more than one storyboard for other languages be sure to check all storyboard settings. That was my case. – ShakeMan Oct 01 '16 at 01:03
  • 5
    It still does not work for me. My deployment target is 8.3 and even if I set the Builds For value to my deployment target or "even 9.0 and Later" I still get the exact same error warning. – Alyoshak Jun 06 '17 at 20:10
  • 1
    Note that, at least in Xcode 11, the "Builds for" popup is not visible initially when you click on a .xib file. You need to then click in the background area of the editor, at which point the "Builds for" popup and some other things appear. I have no idea why it works this way; it took me a while to figure this out, so I thought I'd add a comment about it here. – bhaller May 21 '20 at 22:19
17

Shripada's answer is correct. However, if it's still not working as Alyoshak reported, then as per this thread and my experience, you need to restart Xcode.

This was experienced with the most current version of Xcode at the time (8.3.3)

Lucas
  • 523
  • 2
  • 10
  • 20
nspire
  • 1,567
  • 23
  • 26
6

If changing the minimum build target version nor restarting does not work for you, try inspecting the XIB source file. Right click on the file → Open As → Source Code.

Look for the <dependencies> element near the top, which looks like this:

<dependencies>
    <deployment version="2304" identifier="iOS"/>
    <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
    <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
    <capability name="Safe area layout guides" minToolsVersion="9.0"/>
    <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>

My target build was iOS 9 but the aspect ratio constraint had minToolsVersion at 5.1. When I changed it to 9.0 the warning went away.

Lucas
  • 523
  • 2
  • 10
  • 20
David
  • 161
  • 1
  • 3