ios - 如何禁用较低版本ios的应用程序扩展?

标签 ios objective-c ios11

我正在为 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应该是这样的

enter image description here

关于ios - 如何禁用较低版本ios的应用程序扩展?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46110701/

相关文章:

objective-c - UIViewController 中的 PullToRefresh TableView

ios - 使用 popViewController 动画时按钮色调会改变颜色

ios - 下载 Xcode 9(或 9.1 Beta 版)

ios - 选择搜索栏时,导航栏下的容器 View 没有向上移动

ios - UIColor 获取色调 :saturation:brightness:alpha: returns NO

iphone - 如何在 iOS 应用程序中检索和处理远程推送通知内容

ios - iOS 8 iPhone 主屏幕上应用程序图标下方应用程序名称旁边的红点(圆圈)

ios - 如何在函数之外获取加速度计数据?

ios - 代码签名错误 : code signing is required for product type 'Application' in SDK 'iOS 7. 0

ios - 在 cocos2d v3 中创建填充图像图案的图层的最简单方法