Alb*_*haw 4 objective-c ios ios8 ios-app-extension custom-keyboard
我已经阅读了文档,似乎无法找到任何方法如何在设置>常规>键盘中检测自定义键盘?
有谁知道吗?
这是可能的NSUserDefaults
.只需检索standardUserDefaults
包含用户为密钥"AppleKeyboards"安装的所有键盘数组的对象.然后检查数组是否包含键盘扩展的包标识符.
NSArray *keyboards = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleKeyboards"];
NSLog(@"keyboards: %@", keyboards);
// check for your keyboard
NSUInteger index = [keyboards indexOfObject:@"com.example.productname.keyboard-extension"];
if (index != NSNotFound) {
NSLog(@"found keyboard");
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1036 次 |
最近记录: |