How to check the “Allow Full Access” is enabled in iOS 8?

后端 未结 15 1257
醉酒成梦
醉酒成梦 2020-12-02 07:53

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

15条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 08:06

    This code works for me, I also on App Groups : https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html#//apple_ref/doc/uid/TP40012582-CH26-SW61

    May be it will work without App Groups also.

    And I used this code :

    if(isOpenAccessGranted()){ 
                NSLog("FULL ACCESS ON")                
            }
            else{
                NSLog("FULL ACCESS OFF")               
            }
    }
    
    func isOpenAccessGranted() -> Bool {
            return UIPasteboard.generalPasteboard().isKindOfClass(UIPasteboard)
    }
    

提交回复
热议问题