UIDocumentInteractionController only shows filename and size when previewing

I have a very strange situation. My application is trying to view the pdf file using UIDocumentInteractionController and sometimes it works and others don't. I don't see any difference when it works and when it doesn't.

Some hints:

  • The file is large (> 45 MB). With smaller files it works
  • The file exists and the url is correct (before you view it).
  • Some memory warnings will appear. But they also show up sometimes than UIDocumentInteractionController can open the file. So I don't think it has anything to do with
  • I am testing on devices (iPad is running iOS 8, but the basic sdks of the app are iOS 7) and not in a simulator
  • The only warning I always see that it doesn't work, and I can't see when it works, is the following:

: Invalid error received: Domain error = _UIViewServiceInterfaceErrorDomain Code = 3 "The operation could not be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo = 0x14583dd0 {Message = service connection terminated}

To narrow down the problem I made an application, the only thing it does is view the file. After testing, I found:

  • On iOS 7 it always works great
  • In iOS 8 it sometimes works, but if you try with large files (> 100MB) it doesn't work.

Seems to be an iOS 8 bug, but if any of you have any idea this would be much appreciated.

+3


source to share





All Articles