我正在为 iOS 11 构建 FileProvider 扩展,但我们已经获得了文档选择器 View Controller 扩展来为 iOS 10 提供 UI。这导致即使在 iOS 11 中文档选择器也会弹出。
我们不需要 iOS 11 中的文档选取器 View Controller 扩展。
我的问题是如何仅针对 iOS 11 及更高版本禁用文档选择器 View Controller 扩展?
最佳答案
我终于自己弄清楚了。
苹果文档是这么说的
If you're updating an existing File Provider extension, be sure to set the NSExtensionFileProviderSupportsEnumeration key to YES in your extension's Info.plist file. If you're creating a new extension, Xcode automatically sets this key for you.
但他们忘记提及您应该将 NSExtensionFileProviderSupportsEnumeration 键放入 NSExtension 字典中,而不仅仅是放在该 plist 文件中。
正确的plist应该是这样的
关于ios - 如何禁用较低版本ios的应用程序扩展?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46110701/