问题
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:
- Added a new row named: "Document types"
- Opened node "Item 0"
- Specified value "All files" for "Document Type Name"
- Opened node "Document Content Type UTIs"
- Added two rows
- For "Item 0" I specified "public.data"
- For "item 1" I specified "public.content"
Then:
- I open mail app
- See email with doc-attachment
- Open in -> Yes, my App appears
Then:
- I open Safari and google for "test word doc".
- I open the first Word document and I see it in Safari.
- 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