问题
2015-04-08 22:15:24.756 WSL[391:43257] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/mobile/Containers/Bundle/Application/0FA355FC-B3D0-4B73-94F2-7E1D09B8B178/WSL.app> (loaded)' with name 'myXibName''
*** First throw call stack:
(0x1853182d8 0x196b440e4 0x185318218 0x18a1783ac 0x189e961b0 0x189ed1e10 0x1001020c4 0x10028db40 0x18a059a68 0x18a04d890 0x189e39268 0x189d55760 0x18969de1c 0x189698884 0x189698728 0x189697ebc 0x189697c3c 0x189d4c56c 0x1852d02a4 0x1852cd230 0x1852cd610 0x1851f92d4 0x18ea0f6fc 0x189dbefac 0x10019942c 0x1971c2a08)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I have two files:
myXibName~iphone.xib
myXibName~ipad.xib
This worked pre-upgrade, and works in the simulator, but not when run directly to iPhone 6+ via Xcode. I've tried the usual uninstall, restart Xcode and device etc.
回答1:
Dropping the ~iphone.xib
works. maybe they quietly dropped support for an unnecessary extension?
Edit
Nope - the ~ipad extension isn't being respected now it's exclusively loading from the xib without the device modifier
来源:https://stackoverflow.com/questions/29530388/loading-xib-with-device-modifier-broken-in-xcode-6-3-ios-8-3-iphone-6