VFR-Reader crash in iOS8

I have tested an app that is currently running VFR-Reader-Core on iOS8 and I am getting a complete crash when I try to open the PDF. Am I the only one with this problem? any idea where i can look to fix this? Here is the crash report

thank

+3


source to share


3 answers


IOS 8 has changed the location of the app file system in app containers. Apps and their content are no longer stored in the same root directory.

From the iOS 8 release notes:

Application containers file system layout changed on disk. Rather than relying on a hard-coded directory structure, use the NSSearchPathForDirectoriesInDomains

or class URLForDirectory:inDomain:appropriateForURL:create:error:

method NSFileManager

. See Accessing Files and Directories in the File System Programming Guide .



I had a quick overview of this issue and I see that VFRReader is not following Apple's guidelines above.

I was about to post the issue on the Github page, however issue tracking seems to be disabled. If I get extra time today, I will tackle this solution and raise the pull request.

Edit: Check out my fork for a version that works on iOS8: https://github.com/liamnichols/Reader
I also submitted a pull request for the original repo: https://github.com/vfr/Reader/pull/54

+8


source


From ReaderDocument.m vfreader, the author stated that

"Also, // since as of iOS 8 the ~ / Documents app directory no longer lives in its // package, any PDF attachments must be copied to the app ~ ~ / Documents directory before they can be accessed."



Hope it helps.

+2


source


Finally, it stops there:

@synchronized(nil)  {
    CGContextDrawPDFPage(context, _PDFPageRef);
}

      

and now it works in iOS8.

EDIT: Some changes to the code and now even that doesn't help me avoid this crash. But now if I start the device it works. (simulator accident).

Memory leak, sometimes the good way, sometimes the wrong way: D

+1


source







All Articles