看起來你得到了你在測試種子3 UIApplication.h的440行想要的東西:
// Applications may reject specific types of extensions based on the extension point identifier.
// Constants representing common extension point identifiers are provided further down.
// If unimplemented, the default behavior is to allow the extension point identifier.
- (BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier NS_AVAILABLE_IOS(8_0);
現在沒有包含在這個文檔,但聽起來像它會做你問什麼在這裏。
我猜這些「擴展點標識符」是不是擴展的唯一標識符,但它們的類型,因爲也有這個就行545:
// Extension point identifier constants
UIKIT_EXTERN NSString *const UIApplicationKeyboardExtensionPointIdentifier NS_AVAILABLE_IOS(8_0);
TLDR:禁用自定義鍵盤你將包括這樣的事情在你的應用程序代理:
- (BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier {
if ([extensionPointIdentifier isEqualToString: UIApplicationKeyboardExtensionPointIdentifier]) {
return NO;
}
return YES;
}
如果用戶想使用自定義的鍵盤,你是誰阻止他們? –
@FilipRadelic:安全原因(企業應用程序)。 – matm
@matm - AFAIK你不能那樣做。自定義鍵盤「替換」系統範圍內的系統鍵盤。從企業角度來看,唯一可以做到的事情是:a)禁止安裝App Store應用程序或b)如果某人安裝了包含自定義鍵盤的應用程序,則執行一些操作。但a)很難在自帶設備上實現,b)很難找到... 然後,蘋果開放給雷達(也許適用於iOS9)。 – muenzpraeger