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
I've been testing this today in iOS 10 and getting access to the pasteboard doesn't appear to be enough. In iOS 10 you can set the pasteboard to a var without full access. Here's a solution I came up with...
func checkFullAccess() -> Bool
{
var hasFullAccess = false
if #available(iOSApplicationExtension 10.0, *) {
let pasty = UIPasteboard.general
if pasty.hasURLs || pasty.hasColors || pasty.hasStrings || pasty.hasImages {
hasFullAccess = true
} else {
pasty.string = "TEST"
if pasty.hasStrings {
hasFullAccess = true
pasty.string = ""
}
}
} else {
// Fallback on earlier versions
var clippy : UIPasteboard?
clippy = UIPasteboard.general
if clippy != nil {
hasFullAccess = true
}
}
return hasFullAccess
}
Testing to see if the pasteboard has some content returns false with full access off, even when there's content on the pasteboard. Of course it could actually be empty so after all those tests you can safely attempt to set something on the pasteboard without worrying about replacing something that's already there. If you do have access and the pasteboard had content then the test would have returned true, if you don't have access then you can't overwrite something that was there.
HTH, Mike