When compiled using Xcode 6.3 (iOS 8.3 SDK), some nib filenames end up with an extra ~ipad
or ~iphone
in certain circumstances. For example, ViewController~ipad.xib
becomes ViewController~ipad~ipad.nib
. This is causing a crash because the app doesn't expect the compiled nib files to have the double suffix.

- 5,190
- 1
- 27
- 34
-
1I would take a guess that this is desired behaviour, if you're using Size Classes why would you need to target your xib files using the `~(iphone|ipad).xib` suffix? – Camsoft Apr 10 '15 at 13:36
-
Right—we intended to target our xib files to specific device types. Prior to the release of Xcode 6.3, having size classes enabled in these files didn't cause any problems. – Cameron Spickert Apr 14 '15 at 18:24
-
I suspect it was maybe a bug or design flaw in the previous releases. – Camsoft Apr 17 '15 at 09:44
3 Answers
To fix this, uncheck “Use Size Classes” in any affected documents in Interface Builder.
This appears to be a bug in the version of ibtool
included with Xcode 6.3 (and the iOS 8.3 SDK). It's happening in the following circumstances:
- You have a device-specific input file
*~(iphone|ipad).xib
with size classes enabled. - Your deployment target is anything older than iOS 8.0.
I was able to reproduce the problem on the command line:
xcrun --sdk iphonesimulator8.3 ibtool --minimum-deployment-target 7.0 --compile ViewController~ipad.nib ViewController~ipad.xib
If you're seeing the same behavior, please duplicate this radar. This appears to be fixed in the latest Xcode 6.4 beta.

- 5,190
- 1
- 27
- 34
-
-
The only thing I would say is that if you disable Size Classes you will loose any layouts for defined size classes so this solution really only works if you are only using the regular size class for both iPhone and iPad. – Camsoft Apr 10 '15 at 08:59
-
@Camsoft that's correct. We wanted to target our xibs to specific device types, and didn't want size classes enabled. We just didn't think to disable it because it was never a problem prior to Xcode 6.3. – Cameron Spickert Apr 14 '15 at 18:26
-
@jshier thanks for the suggestion—went ahead and filed [a radar](http://www.openradar.me/radar?id=5049732669898752). – Cameron Spickert Apr 14 '15 at 18:40
-
Even tho it might be a bug, it makes sense. I mean, if you have a xib ending in ~iphone.xib or ~ipad.xib means that you don't want size classes, you instead want to define the layouts in different files. So makes sense to disable it. – Pauls Apr 16 '15 at 07:51
-
As long as xibs default to using size classes, and after trawling through about forty xibs, I'd say it's a bug alright :) – HenryRootTwo Apr 23 '15 at 03:12
change ~ to _ in the xib name and specify explicitly the suffix while loading the bundle programmatically.

- 2,773
- 1
- 20
- 24
This appears to be a bug of Xcode 6.3 when compiling XIB files. In order to workaround the exceptions there are 4 Options:
- Target your project to iOS 8
- Use storyboards instead of XIB files
- Disable Size Classes
- Handle NIB loading in code
I detailed each of these options in my blog post: http://www.joobik.com/2015/04/fixing-xcode-63-ios-sdk-error-could-not.html

- 96
- 2