简体   繁体   English

iOS 11文件应用程序:如何包含应用程序包中的文件

[英]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 BrowserUISupportsDocumentBrowser )键添加到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.

相关问题 如何在iOS 11文件应用中设置应用文件夹图标 - How to set app folder icon in iOS 11 files app iOS App Bundle中的多个本地化.strings文件 - Multiple Localized .strings Files in iOS App Bundle 将文件从iOS 11文件应用复制到沙箱 - Copy file from iOS 11 Files app to sandbox 如何将文件文件夹从IOS App捆绑资源复制到Documents Directory - How to copy a folder of files from IOS App bundle resources to Documents Directory 通过iOS11文件应用程序在应用程序中导入多个文件 - Import multiple files in app via iOS11 files app iOS:将资源(音频)文件包含到应用程序的应用程序文件夹中,而不是添加到包中 - iOS: Include the resource(audio) files into the application folder of the app rather than adding into the bundle 如何在我的IOS应用程序中包含HTML页面的js文件? - How to include the js files of my html page in my IOS app? 应用包中的本地化文件 - Localization files in app bundle 如何从现有应用安装/捆绑中删除旧的构建文件? - How to remove old build files from an existing app install/bundle? 对于IOS Phonegap应用,可以包含非该应用本地的javascript文件吗 - For a IOS Phonegap App, is it okay to include javascript files not local to the app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM