Third-party keyboards
- 22 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
Third-party keyboards
- Mis à jour le 22 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article
Avez-vous trouvé ce résumé utile ?
Merci pour vos commentaires
Custom keyboards can be installed on an iOS device. Some of these third-party keyboards might have access to the internet and maliciously act as a keylogger to record sensitive data. You can protect against these keyboards by blocking their use in your app. This is done at the code level in your AppDelegate class.
For Objective-C apps, use the following function:
- (BOOL)application:(UIApplication *)application
shouldAllowExtensionPointIdentifier:(UIApplicationExtensionPointIdentifier)extensionPointIdentifier {
return extensionPointIdentifier != UIApplicationKeyboardExtensionPointIdentifier;
}
For Swift, use the following function:
func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier
extensionPointIdentifier: UIApplication.ExtensionPointIdentifier) -> Bool {
return extensionPointIdentifier != .keyboard
}
Cet article vous a-t-il été utile ?