MCBrowserViewController causes storyboard load error

When I segue to a subclass of MCBrowserViewController, I get this error message:


2015-07-06 10:56:44.249 PeerToPeer[475:97132] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/mobile/Containers/Bundle/Application/295D6603-DA57-475A-9EC2-9C4AAEF77586/PeerToPeer.app> (loaded)' with name 'MCBrowserViewController''

*** First throw call stack:

(0x1856e82d8 0x1973bc0e4 0x1856e8218 0x18a580340 0x18a47c318 0x18a1609bc 0x18a160928 0x18a85618c 0x18a4660dc 0x18a482378 0x18a4848c8 0x18a24e0ec 0x100015bbc 0x18a195398 0x18a17e474 0x18a194d34 0x18a1949c0 0x18a18defc 0x18a161120 0x18a4022b8 0x18a15f634 0x1856a0240 0x18569f4e4 0x18569d594 0x1855c92d4 0x18f01f6fc 0x18a1c6f40 0x100016a88 0x197a66a08)

libc++abi.dylib: terminating with uncaught exception of type NSException


Any ideas on how to fix this?


After Nore Experimenting:

I don't see it in the documentation, but maybe this class is not meant to be subclassed; it works fine when I use MCBrowserViewController rather than a subclass.

I don't see it in the documentation, but maybe this class is not meant to be subclassed [...]

Interesting. If things are working when you don't subclass, I definitely recommend that you go in that direction. In general, subclassing 'large' system classes is a bad idea and, unless they've explicitly documented to support subclassing, my general recommendation is that you not do so.

In this specific case, I'd appreciate you filing a bug against the Multipeer Connectivity documentation recommending that it specify whether subclassing is allowed or not. Please post your bug number, just for the record.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
MCBrowserViewController causes storyboard load error
 
 
Q