1

I've tried prowling stackoverflow, and I've found some answers where you:

1) update UIPasteboard, which I don't want to be altering for obvious reasons (Allow Full Access check in keyboards iOS10)

2) check NSUserdefaults, drawbacks are the keyboard must be opened, and allow full access be enabled, and if it is later disabled, there will be the false value (https://forums.developer.apple.com/thread/28690)

Looking for iOS 10, Swift 3 solution. Thank you!

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
VDog
  • 1,083
  • 2
  • 13
  • 35

1 Answers1

7

this is what I use in my code in swift

var hasAccess: Bool {
    get{
        if #available(iOSApplicationExtension 11.0, *) {
            return self.hasFullAccess
        } else {
            return UIDevice.current.identifierForVendor != nil
        }
    }
}