我正在构建一个报亭通用应用程序.当我下载杂志问题并打开它时,它运行正常,但是当我删除它,重新下载并打开它时会抛出以下内容:
2013-04-01 22:06:07.672 Magazine[14353:707] *** Assertion failure in -[ReaderContentPage initWithURL:page:password:],/Volumes/Files/Work in progress/el-beit/Magazine/Sources/ReaderContentPage.m:471 2013-04-01 22:06:07.680 Magazine[14353:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',reason: 'CGPDFDocumentRef == NULL' *** First throw call stack: (0x35a4788f 0x3366b259 0x35a47789 0x34e3b3a3 0x84e59 0x85ba7 0x96d47 0x976ad 0x34e6d933 0x35a1ba33 0x35a1b699 0x35a1a26f 0x3599d4a5 0x3599d36d 0x33738439 0x33175cd5 0x6cf81 0x6cf08) terminate called throwing an exception(lldb)
NKLibrary *nkLib = [NKLibrary sharedLibrary]; NKIssue *issue = [nkLib issueWithName:[kBaseFeatureID stringByAppendingString:((NSNumber *)self.listOfMonths[index]).stringValue]]; NSString *name = issue.name; [nkLib removeIssue:issue]; [nkLib addIssueWithName:name date:[self.dateFormatter dateFromString:((NSNumber *)self.listOfMonths[index]).stringValue]];
我正在使用报亭,iOS6,Xcode 4.6,MKStoreKit以及该项目的模板:https://github.com/vfr/Reader
任何帮助将不胜感激,提前谢谢.
解决方法
我通过使用解决了这个问题
[[ReaderDocument alloc] initWithFilePath:file password:nil];
代替
[ReaderDocument withDocumentFilePath:file password:nil];