在iOS 7中,CGPDFDocumentCreateWithURL返回nil

在iOS 7中,CGPDFDocumentCreateWithURL返回nil,ios,objective-c,ios6,ios7,Ios,Objective C,Ios6,Ios7,我开始在iOS 7上测试我的应用程序,我发现一个奇怪的情况,这段代码在iOS 6上运行良好 CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,(CFStringRef)pdfPath, kCFURLPOSIXPathStyle, FALSE); CGPDFDocumentRef myPdf = CGPDFDocumentCreateWithURL(url); 但是在iOS 7上,myPdf设置为零

我开始在iOS 7上测试我的应用程序,我发现一个奇怪的情况,这段代码在iOS 6上运行良好

    CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,(CFStringRef)pdfPath, kCFURLPOSIXPathStyle, FALSE);

    CGPDFDocumentRef myPdf = CGPDFDocumentCreateWithURL(url);
但是在iOS 7上,
myPdf
设置为零

我检查了
pdfPath
它的存在,所以任何想法都会对大家有所帮助


Thnaks.

当NSURL保留有效URL时,输出应如下所示: file:///Users/dev/Library/Developer/CoreSimulator/Devices/4FF18699-D82F-4D08-88D6-44E3C11C955A/data/Containers/Bundle/Application/8F230041-AC15-45D3-863F-5778B565B12F/MyPDF.app/MyPDF.pdf file:///Users/dev/Library/Developer/CoreSimulator/Devices/4FF18699-D82F-4D08-88D6-44E3C11C955A/data/Containers/Bundle/Application/8F230041-AC15-45D3-863F-5778B565B12F/MyPDF.app/MyPDF.pdf

如果要通过
url
访问文件,url应为 -前缀为“file://”的文件URL -指向应用程序包中的某个位置


检查你是如何创建你的
url的

iOS 7仍在保密协议下-你应该在苹果开发者论坛上问这个问题。谢谢@rmaddy。。我已经在那里发布了一条关于这个的帖子。