Making a keylogger will be kinda easy, but you won’t really be able to push it on the Apple app store. The problem is, their review team actually looks at some of the code.
Anyways, as everyone has said. Google is going to be your friend on this one. However, you need to also find a way to side load it (which shouldn’t be that hard using xcode).
As a dev, you will need to learn Objective C and Swift (depending on the age of the iOS). For Android, you will need to know XML and Java.