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

后端 未结 15 1258
醉酒成梦
醉酒成梦 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:11

    For those of you who are using iOS 10 and Objective-C this will work as intended.

    - (BOOL)hasFullAccess
    {
        UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
        NSString *originalString = pasteboard.string;
        pasteboard.string = @"TEST";
        if (pasteboard.hasStrings) {
            pasteboard.string = originalString;
            return YES;
        } else {
            return NO;
        }
    }
    

提交回复
热议问题