![](/img/trans.png)
[英]Is there any private api to detect camera access by different apps on iphone?
[英]Is there any private api that can monitor keyboard access (which app is using keyboard,its access time etc) on iphone?
我需要實現一個監控鍵盤活動的應用程序,即哪個應用程序在iPhone上使用鍵盤。 根本不需要使用鍵盤檢索該應用輸入的按鍵/數據。
我的應用程序將在后台使用蘋果的背景多任務功能為voip和導航器運行。
我可以使用私有api,因為我的客戶端在appstore上不需要這個應用程序。 iPhone是非越獄的。 謝謝。
我不知道任何私有API會持續不斷地在后台進行,並且正如已經說過Apple也不喜歡它。
您唯一能做的就是使用自己的應用程序監視UITextField
中的更改
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldDidChange:) name:UITextFieldTextDidChangeNotification object:nil];
。
在textFieldDidChange:
然后您可以檢查UITextField
的內容是如何更改的,從中您應該能夠知道按下了哪個鍵。
使用此方法當然是一種記錄方式( UITextField類參考 )。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.