124

I recently updated to XCode 9. When I build the app it says "illegal configuration" for some storyboards in my pod files. I tried to recreate the storyboard files but it doesn't help.

[1]

Omal Perera
  • 2,971
  • 3
  • 21
  • 26
NSXCode
  • 1,243
  • 2
  • 8
  • 5

5 Answers5

230

XCode 9 will not support storyboards that are built for iOS version less than 7.

Try changing the Builds for in File Inspector to a higher version then Clean and Build.

See screenshot

enter image description here

Edit: Important info from @user435779 below: Restart XCode if the errors don't go away.

n13
  • 6,843
  • 53
  • 40
Vinay Kumar
  • 3,257
  • 1
  • 20
  • 19
  • 1
    I highly recommend setting **Builds for** to `Deployment Target (v.m)` *(make sure your target is 7+)* – Jacksonkr Aug 28 '17 at 15:28
  • 28
    I found I also needed to close and restart XCode after doing the Clean. No idea why. ymmv – user435779 Sep 21 '17 at 14:44
  • @user435779 You were right, restarting did the trick. Clean then restart. Also, it works if you actually open all your xib files, one by one, and setting the Deployment Target manually, if not already set. Then clean and restart. – bogdan Sep 22 '17 at 07:09
  • 3
    I had a bunch of xib files so changing each build for would have been a small challenge, but simply changing the Deployment Target worked fine for me. For laughs, it was set to 6.1! Lol. – Popmedic Sep 28 '17 at 14:39
  • I had a few random XIBs set to 7.x - no idea why. Thank you @user435779 - I needed to restart XCode to make it work. I'll add that to the main answer. – n13 Oct 03 '17 at 00:56
  • I cannot find "File Inspector" anywhere in "Xcode 9". Could you please provide a larger screenshot showing how to get there? – DJ Gruby Nov 03 '17 at 11:46
  • 1
    @DJGruby Please check this screenshot https://screencast.com/t/Eaf1olBCp – Vinay Kumar Nov 03 '17 at 12:23
  • I recommend that you choose the deployment target iOS version. – Hahnemann Dec 19 '17 at 22:48
  • Don't know why but always restart the XCode does the Job.! – Soumen Feb 23 '18 at 11:45
32

Simply set the deployment target to 8.0 + in General to fix this issue. No need to go through each xib file.

enter image description here

itzo
  • 1,220
  • 14
  • 18
  • You set the target to 7.0, you would not have issues too! So if you want lower deployment target 7.0 is the lowest possible to avoid this Illegal Configuration issue. – itzo Nov 24 '17 at 07:58
  • got error "This application does not support this device’s CPU type" – Vineesh TP Jan 17 '18 at 06:45
  • Even though the `Deployment Target` is set under `General`, the xib files can independently have their `File Inspector` -> `Interface Builder Document` section set to a separate `Builds for` setting that does not follow the `General` setting. This is especially true when you are re-using "code" or xib files across projects or from open source. – Cerniuk Mar 29 '18 at 16:59
  • Thank you - I needed to open an old project and Xcode was beach-balling as soon as I tried to open the Storyboard to change the deployment target. Changing the Deployment Target for the whole project was the best solution for me. – Andrew Ebling Nov 29 '21 at 10:29
14

As storyboard in Xcode 9 will not support which is below iOS 7.0, so you need to update the iOS version in File inspector.

For more information please find the below GIF representation.

enter image description here

Hope it works!!!

Ramkrishna Sharma
  • 6,961
  • 3
  • 42
  • 51
1

I tried both methods - On Xcode 9.3 (9E145)

For each XIB, I added the following Target.

enter image description here

The On Targets -> General -> Deployment Info-> Change target

enter image description here

Cleaned the project and build again into device. It worked!

Alvin George
  • 14,148
  • 92
  • 64
1

My case was the different, I did all the above solution but not getting succeed build, so I read the error with focus and go to manually with the file open the .Xib file and change it development target to iOS 10 and later.

and Yup.. its work Fine

Syed Haris
  • 21
  • 3