Open files from Safari with “Open in” in my app

风流意气都作罢 提交于 2020-01-13 22:44:17

问题


I need to be able to open any file from Safari in my app via the "Open in" feature. My app will appear in the "Open in"-list when I try to open any file in mail-app or another custom app, but my app won't appear in Safari. Why? What I did:

I specified following stuff in my plist:

  1. Added a new row named: "Document types"
  2. Opened node "Item 0"
  3. Specified value "All files" for "Document Type Name"
  4. Opened node "Document Content Type UTIs"
  5. Added two rows
  6. For "Item 0" I specified "public.data"
  7. For "item 1" I specified "public.content"

Then:

  1. I open mail app
  2. See email with doc-attachment
  3. Open in -> Yes, my App appears

Then:

  1. I open Safari and google for "test word doc".
  2. I open the first Word document and I see it in Safari.
  3. Then I tap on "Open in" and my app does not appear!

Why? What do I need to do to get the ability to open files in my app via Safari?


回答1:


You can try to set "Document Role" to "Editor"

I think your Document types is right because Dropbox app does the same way

This is a part of info.plist of Dropbox app



来源:https://stackoverflow.com/questions/17557014/open-files-from-safari-with-open-in-in-my-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!