如何检查“允许完全访问”在iOS 8中启用? [英] How to check the "Allow Full Access" is enabled in iOS 8?
本文介绍了如何检查“允许完全访问”在iOS 8中启用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在iOS 8中,当开发自定义键盘并在info.plist中将RequestsOpenAccess属性设置为YES时,在设置 - >添加新键盘上有一个名为允许完全访问的切换按钮。自定义键盘代码如何知道用户启用或禁用此切换?
In iOS 8, when develop a custom keyboard and set RequestsOpenAccess property to YES in info.plist, there is a toggle button at Settings-> Add New Keyboard named "Allow Full Access". How does the custom keyboard code know that the user enabled or disabled this toggle?
推荐答案
iOS 10更新时间08/23/2017兼容性:
UPDATE 08/23/2017 for iOS 10 compatibility:
func isOpenAccessGranted() -> Bool{
UIPasteboard.general.string = "CHECK"
return UIPasteboard.general.hasStrings
}
iOS 8:
-(BOOL)isOpenAccessGranted{
return [UIPasteboard generalPasteboard];
}
请注意,模拟器将始终告诉您已满访问以便正常工作,您需要从设备运行它。
这篇关于如何检查“允许完全访问”在iOS 8中启用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文