iOS keylogger for jailbroken devices - ios

I want to know how to implement a keylogger for iOS jailbroken iPhones and prevent being logged by others.
1. Implementing a keylogger in iOS (jailbreak)
I have thought of two ways to do this,
First way:
I hook _endedEditing method of class UITextField and save the text of the textfield somewhere. The advantage of this way is it's easy and it's not depending on what you typed. So if you have copied some text in the textfield, you would know that too. The problem is It's not called for text boxes in html webpages like google search bar or some programs that there keyboard doesn't hide.
Second way:
I should hook the keyboard buttons press method and save there labels. The keystrokes should be slit every time the keyboard hides. There is a problem here for me: First of all I can't find the right method of the right class to hook. I've found UIKeyboardButton that inherits from UIButton but when I hook any method of that it's not called, I don't know why!
So how can I implement a keylogger for iOS?
2. Preventing an app being keylogged by a third party app/tweak
Now the second part of my question; There is a keylogger in cydia named iKeyMonitor that logs keystrokes and it's good at its job. The suprising thing here is that it can't log whatever is typed in iFile app! I even have tested this with the first way I mentioned above and I can't receive any text when I type anything in iFile. How does iFile do this and how can we do the same thing for our app?

Related

Want to text input in custom keyboard extension

I'm making ios keyboard extension and it contains view which has a TextField, but I realized this view is keyboard itself...
To input text in this TextField, what is the best solution?
That's all I can come up with at the moment(I don't know it's possible or not)
Call native keyboard and get a callback on complete input. (It looks impossible)
Use some awesome keyboard library that can be imported to view. (It looks the best solution, or do I need make keyboard scratch...?)
Move container app and back on complete to input. (It's not preferred, because I want complete all on keyboard)
Probably, it's a very rare case, hope someone helps...
thanks!

iOS AudioKit using `AKKeyboardView`

The question is very simple. Is it possible to programmatically send a note on/off so it will show on the keyboard view? What I'm trying to do is link the AKMIDICallbackInstrument to the keyboard.
There was an article about doing something similar but it doesn't seem to be possible. (Thinking about it, the keyboard delegate should be the one handling keyboard view touch events, not the other way around...) Also checked the AKKeyboardView code, but it seems like there are only touch related code.
If there is no such method, are there plans to add them?
Two methods have been added to AKKeyboardView on the develop branch of AudioKit:
programmaticNoteOn(_ note: MIDINoteNumber)
programmaticNoteOff(_ note: MIDINoteNumber)
These allow you to programmatically simulate key presses and key releases without calling the delegate.

What is the process to include a Custom Keyboard in my iOS app

First of all I'm not looking for code or how to do it, just the process.
I don't fully understand how Custom Keyboards work in iOS8-up and I would like to include a simple custom numeric keyboard in my app. In the past I have created static keyboards with multiple UIButtons which are visible all the time, this time however I want a custom 9 digit keyboard with the same behavior as one of the default keyboards in iOS, in other words, the keyboard will show when a UITextField is tapped and hide when the resignFirstResponder method is called. I want this to be the default and ONLY keyboard used in my app.
What are my alternatives to adopt the behavior described above?
Do I need to create a Custom Keyboard extension?
Can someone describe the process to include a custom keyboard that acts as the default keybaord WITHIN your app?
Again I'm not looking for how to do it just the process.
Thanks

Custom keyboard: stability

I created some custom keyboard, and although I wasn't able to really test it I have an impression that my keyboard is extremely unstable on device.
In some cases it just isn't loaded in app (I have it with Telegram messenger; when my keyboard is active and I'm trying to open Telegram I don't have any keyboard at all from time to time; to fix it I have to open any other app with keyboard input and go back to Telegram).
In some cases it is unloaded without user's interaction.
In some cases it is shown in keyboards list (not in the settings, but after the long tap on the switch keyboard button) as "(null)-myKeyboard". Sometimes it happens just after install (but if I'm just wait for, like, a minute — it will work)
In some cases — and this one worries me the most — my keyboard is removed from the active keyboards list in Settings.
When it works, it works. But it is obviously not very usable.
My keyboard is written in Swift (a bunch of buttons with a lot of NSLayoutConstraints, all written in code); I'm using Realm to store some constants; I have like 3-4 small images on buttons; I need full access for my keyboard.
Could you please give me some directions? What could be the problem here, and what is the best way to find it?

Get Instance of iOS Keyboard Without First Responder

My application uses Cordova so a number of functions are performed in the webview.
There is an object in one of my webviews that brings up the keyboard.
All the documentation and SO answers on changing the keyboard involve setting the values of the first responder. My problem is, on the native side, I do not have the first responder.
So my question is:
Can I get access to the keyboard object without the first responder, and if so how?
Swift/Obj-c answers welcome
You can use UIReturnKeyType for native controls, but unfortunately there is no way to control the return key for text fields within a webview. You might be able to figure out some sort of hacky solution though.
One idea is to manually modify the keyboard views. There's an Apache plugin that uses this to hide the form accessory bar on keyboards. You can see how they do it here. You would have to find the return key's view instead of the form bar though. Of course this isn't supported and is likely to break at some point.
Another option might be to use swizzling to modify UIWebView to use the UIReturnKeyType you want. You'd have to look into dumping the headers to find a possible starting point. This option also has the potential to break along with a chance Apple rejects your app.

Resources