Xcode: Compiled device specific xibs get a wrong name when deployment target is 7.0

Originator:dieter.komendera
Number:rdar://20897101 Date Originated:11-May-2015 04:44 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.3.1 (6D1002)
Classification:Serious Bug Reproducible:Always
 
Summary:
When building an iOS app with the deployment target set to iOS 7.0 containing a device specific .xib, the compiled nib in the app bundle gets a wrong name.

E.g the expected filename in the app bundle for the attached example project should be MyNib~iphone.nib, but it actually is MyNib~iphone~iphone.nib

This leads unexpected behavior as the object in the xib can not be instantiated using
UINib(nibName: "MyNib", bundle: nil).instantiateWithOwner(nil, options: nil)

Steps to Reproduce:
Run the example project

Expected Results:
No crash

Actual Results:
Crash

NibCrash[9164:2665901] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/mobile/Containers/Bundle/Application/DD875712-11A6-462F-9B81-63619173C44F/NibCrash.app> (loaded)' with name 'MyNib''

Regression:
This is a regression from Xcode 6.3.0

Notes:
The demo project can be also downloaded from http://komendera.com/radars/NibCrash.zip

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!