[英]iOS 11 Files App: How to include files from app bundle
I watched the keynote this year at WWDC and am excited about all the new feature additions being brought to iOS 11. The high importance Apple has placed on games in the App Store and the biggest upgrades in the history of iPad is very exciting. 我在WWDC上观看了今年的主题演讲 ,并对iOS 11带来的所有新功能感到兴奋。苹果对App Store游戏的重视程度很高,而iPad历史上最大的升级也非常令人兴奋。 But what was most thriling to me was that iOS 11 will bring for the first time some sibilance of a file system to iOS.
但是对我而言,最让我烦恼的是,iOS 11将首次为iOS带来文件系统的一些乐趣。 They call it the
Files
app, naturally. 他们自然地将其称为“
Files
应用。 It seems a big step forward in the new user's getting that same windows-like experience from Microsoft products into iOS. 新用户从Microsoft产品到iOS获得相同的类似Windows的体验似乎向前迈出了一大步。
My question though as a developer currently in development of a project that is heavily document oriented, how am I to be forward looking in my design as so to handle this capability? 我的问题是,作为一名目前正在开发高度面向文档的项目的开发人员,我将如何向前看待我的设计以处理此功能? I know now that Apple allows your app to expose the
documents
directory of your application sandbox to the user via iTunes if you enable this capability in your .plist
using the Application supports iTunes file sharing
key. 我现在知道,如果您使用
Application supports iTunes file sharing
密钥在.plist
启用此功能,则Apple允许您的应用程序通过iTunes向用户公开应用程序沙箱的documents
目录。 Will this work the same way for the Files
app? 对于“
Files
应用程序,其工作方式是否相同? Meaning, will the Files
app expose the documents
folder of all the apps on your device that have the Application supports iTunes file sharing
key set to YES
in the app's .plist
? 意思是,“
Files
应用程序是否会公开设备上所有具有该Application supports iTunes file sharing
密钥的Application supports iTunes file sharing
程序的documents
文件夹(在应用程序的.plist
设置为YES
?
Just add Supports Document Browser
( UISupportsDocumentBrowser
) key to Info.plist and set it to YES. 只需将
Supports Document Browser
( UISupportsDocumentBrowser
)键添加到Info.plist并将其设置为YES。
The documents folder will be shown in On My iPhone
section if there are files inside. 如果其中包含文件,则documents文件夹将显示在
On My iPhone
部分中。
If your app supports iTunes file sharing, and if the Info.plist key "Supports opening documents in place" ( LSSupportsOpeningDocumentsInPlace
) is also set to YES
, files in your app's Documents directory will be visible in the Files app. 如果您的应用程序支持iTunes文件共享,并且Info.plist键“支持就地打开文档”(
LSSupportsOpeningDocumentsInPlace
)也设置为YES
,则在“文件”应用程序中将显示应用程序“文档”目录中的文件。 That is safe if you have a UIDocument-based app. 如果您有一个基于UIDocument的应用程序,那是安全的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.