问题
Can a custom keyboard app extension detect a specific user’s identity based on settings/credentials/identification mechanism in the companion app or otherwise? By "identifying a specific user", I mean in the context of my own application/service/brand, not personal/phone data on their device.
Or is it always a static keyboard, always unable to determine the user/phone using it?
回答1:
I think you should be able to. In your companion app, put whatever identifier you want in the NSUserDefaults
, and let the keyboard pick that stuff up in its viewDidLoad of its UIInputViewController
subclass.
Let me know if that works.
回答2:
No; this is prohibited by Apple.
来源:https://stackoverflow.com/questions/24943631/can-a-custom-keyboard-extension-identify-a-user-of-my-companion-application-in-a