简体   繁体   中英

Is there any private api that can monitor keyboard access (which app is using keyboard,its access time etc) on iphone?

I need to implement an app that monitors keyboard activity ie which app is using keyboard on iPhone. no need to retrieve key pressed/data entered by that app using keyboard at all.

my app is going to run in background using apple's background multitasking feature for voip and navigators.

I can use private api as my client doesn't need this app on appstore. iPhone is non-jailbroken. Thanks.

Im not aware of any private API do to this continuously and in background, and as already said Apple wouldn't like it either.

The only thing you can do, is monitor changes in a UITextField in your own app using
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldDidChange:) name:UITextFieldTextDidChangeNotification object:nil]; .
In textFieldDidChange: you could then check how the contents of the UITextField changed, and from that you should be able to know what key was pressed.

Using this method would of course be a documented way ( UITextField Class Reference ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM