{"id":4917,"date":"2014-03-30T16:55:48","date_gmt":"2014-03-30T16:55:48","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/uikit-nib-not-loading-in-bundle-collection-of-common-programming-errors\/"},"modified":"2014-03-30T16:55:48","modified_gmt":"2014-03-30T16:55:48","slug":"uikit-nib-not-loading-in-bundle-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/uikit-nib-not-loading-in-bundle-collection-of-common-programming-errors\/","title":{"rendered":"UIKit NIB not loading in bundle-Collection of common programming errors"},"content":{"rendered":"<pre><code>NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle  (loaded)' with name '_UIDocumentActivityViewController''\n<\/code><\/pre>\n<p>I&#8217;m creating a <code>QLPreviewController<\/code>, presenting it to show a PDF. I then tap the share button. It crashes.<\/p>\n<p>I downloaded Apple&#8217;s Document Interaction example project. I put my PDF fetching class into there, fetched a PDF, display it.. and it works. No crash on the share button. Both are for targets 6.1. I tried setting Apple&#8217;s code to target iPad only like my project. Their code works, mine doesn&#8217;t, and I&#8217;m baffled. From the error message it sounds like a bug in the SDK but I can&#8217;t pinpoint it.<\/p>\n<p>Have you seen this before?<\/p>\n<pre><code>    QLPreviewController *previewController = [[QLPreviewController alloc] init];\n\n    [previewController setDataSource:self];\n\n    [previewController setDelegate:self];\n\n    [self presentViewController:previewController animated:YES completion:^{}];\n\n\n\n#pragma mark QLPreviewControllerDataSource\n\n- (NSInteger) numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller {\n\n    return 1;\n}\n\n- (id )previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index {\n    return [NSURL fileURLWithPath:self.pdfPath];\n}\n<\/code><\/pre>\n<p>I tried removing the reference to the framework, deleting derived data, cleaning the project, readding the <code>QuickLook<\/code> framework. I did show in Finder in both Apple&#8217;s project &amp; mine &amp; they have the same path.<\/p>\n<p>And same thing occurs when I use a <code>UIDocumentInteractionController<\/code>. That little overlay with the email\/print etc options is not loading in my project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NSInternalInconsistencyException&#8217;, reason: &#8216;Could not load NIB in bundle: &#8216;NSBundle (loaded)&#8217; with name &#8216;_UIDocumentActivityViewController&#8221; I&#8217;m creating a QLPreviewController, presenting it to show a PDF. I then tap the share button. It crashes. I downloaded Apple&#8217;s Document Interaction example project. I put my PDF fetching class into there, fetched a PDF, display it.. and it works. No [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4917","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4917"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4917\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}