Home  >  Q&A  >  body text

objective-c - iOS用UIDocumentInteractionController打开文件,第二次进入界面打开就失败了

  1. 我在一个界面写了一个列表下载PPT文件,当在该页面下载完了之后,马上打开是可以的, 但是,当我退出程序再次进入打开时,就显示下图了,这是怎么回事呢缓存被清了吧

大家讲道理大家讲道理2729 days ago688

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 18:02:40

    Possibility:

    1. Whether the downloaded file is downloaded to memory or disk.

      • If it is in the memory, it will definitely be gone when you exit and come back.

      • If it is on the disk, check whether it is saved successfully on the disk.

    2. Is the file path correct? You must use a relative path. You cannot save an absolute path and then use the absolute path to open it next time. Every time you restart the app, the path to the sandbox will change.

    3. Opening method, I don’t know how you open it, so I can’t comment.

    reply
    0
  • Cancelreply