gpt4 book ai didi

iphone - NSInternalInconsistencyException 为 'CGPDFDocumentRef == NULL'

转载 作者:行者123 更新时间:2023-12-03 19:21:17 29 4
gpt4 key购买 nike

我正在构建一个报亭通用应用程序。当我下载一期杂志并打开它时,它运行正常,但是当我删除它,重新下载并打开它时,它会抛出以下错误:

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]];

我使用的是Newsstand、iOS6、Xcode 4.6、MKStoreKit,以及这个项目的模板:https://github.com/vfr/Reader

读者似乎试图打开已删除的文件,而不是我提供给它的文件。

如有任何帮助,我们将不胜感激,提前致谢。

最佳答案

我通过使用解决了这个问题

[[ReaderDocument alloc] initWithFilePath:file password:nil];

而不是

[ReaderDocument withDocumentFilePath:file password:nil];

关于iphone - NSInternalInconsistencyException 为 'CGPDFDocumentRef == NULL',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15751246/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com