Adding LSSupportsOpeningDocumentsInPlace to Info.plist makes the iCloud Drive app open too many documents in my app
| Originator: | lextar | ||
| Number: | rdar://24886084 | Date Originated: | 29-Feb-2016 05:19 PM |
| Status: | Duplicate of 24745414 (Closed) | Resolved: | |
| Product: | iOS | Product Version: | 9.2.1 |
| Classification: | Other Bug | Reproducible: | Sometimes |
Summary: I added the LSSupportsOpeningDocumentsInPlace key to my Info.plist file in order to support opening documents in place. When I now use the iCloud Drive app, many files, including Pages and Numbers documents are opened in my app when I tap them. Instead, it should display a preview of the document or open it in Pages/Numbers. Steps to Reproduce: - add LSSupportsOpeningDocumentsInPlace YES to the Info.plist of my app and install it on an iOS device - launch the iCloud Drive app - tap on a Pages document Expected Results: - it should display a preview of the Pages document or open the document in Pages Actual Results: - the Pages document opens in my app instead which cannot handle it Regression: I tried changing the LSHandlerRank of registered CFBundleDocumentTypes, but that didn’t change anything for me. Notes: My app (Textastic Code Editor) registers support for many file formats in the CFBundleDocumentTypes key including „public.text“ and things like „public.image“ in order to appear in the „Open In“ menu. Yet, I do not want it to be the default iCloud Drive handler for ALL text and image files. I think there needs to be a way to limit the document types that the iCloud Drive app uses to open documents in an app by default. I’ve added Textastic’s Info.plist file that contains all exported type UTIs so you can have a look at it.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Apple Developer Relations May 18 2016, 8:34 AM
Engineering has determined that your bug report is a duplicate of another issue and will be closed.
The open or closed status of the original bug report your issue was duplicated to appears in the yellow "Duplicate of XXXXXXXX" section of the bug reporter user interface. This section appears near the top of the right column's bug detail view just under the bug number, title, state, product and rank.
If you have any questions or concerns, please update your report directly here: http://bugreport.apple.com/.
Alexander Blach March 17 2016, 3:23 PM
I added "public.data" because not all file extensions of text files are necessarily known to the system. I do want my app to appear in the "Open In…" sheet for all files so that a user who receives a file called, say, "test.xyz" can open it in my app. However, I do not want this to result in the iCloud Drive app opening all files in my app.
Maybe the iCloud Drive app should look at the "LSHandlerRank" key or it should be possible to say "I don't want certain document types I define in my Info.plist to be opened in place" by setting another key.
For example, an app like Pages might want to have all .pages documents opened in Pages, but it does not want the iCloud Drive app let it open all the other files it technically supports.
You can also see the problem I'm describing in this Pixelmator support thread: "Why PDF files in "iCloud Drive" always open in Pixelmator" http://support.pixelmator.com/viewtopic.php?f=10&t=12401 Pixelmator can open PDF files. But users certainly do not want want all PDF files in iCloud Drive automatically open the Pixelmator app. Instead, they want to see a PDF preview inside the iCloud Drive app.
Apple Developer Relations March 3 2016, 8:20 PM
We have determined that this is an issue for you to resolve.
Your app claims to open all files:
If your app cannot actually open all files, you should not claim to handle public.data.
Please let us know whether the issue is resolved for you by updating your bug report.