首先,我使用的是 1.10.2 版本
我在打开 pdf 文档时遇到问题。
NSURL* documentURL = [NSURL URLWithString:[[loader getPDFResourcePath:file] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
PSPDFDocument* document = [PSPDFDocument PDFDocumentWithUrl:documentURL];
PSPDFViewController* pdfController = [[PSPDFViewController alloc] initWithDocument:document];
[self presentModalViewController:pdfController animated:NO];
但我收到这些错误代码:
Oct 16 14:35:52 device-07 MODULESTEST[5150] <Error>: CFURLCreateDataAndPropertiesFromResource: failed with error code -15.
2012-10-16 14:35:52.217 MODULESTEST[5150:707] Error: -[PSPDFGlobalLock documentProviderForDocument:page:]/246 Cannot get document reference (although file exists) for /var/mobile/Applications/24968027-8B41-4B3B-937F-B9624F9661CB/MODULESTEST.app/buildresources/testbundles/bundle_one.bundle//activities/content_specifications.pdf
2012-10-16 14:50:10.038 MODULESTEST[5170:170b] Warning: __45-[PSPDFCache cacheDocument:startAtPage:size:]_block_invoke_0/1015 Document has zero pages. Not caching.
我还使用了 iExplorer3,并且该文件存在于应用程序中。