IPhone – Can someone install a keylogger on a non-Jailbroken iPhone

iphonejailbreakprivacySecurity

I personally myself never had an iPhone all my life except I once owned an iPod touch back in 2012 for a couple of months but I am still a tech savvy person and I know the JailBreak process and Android rooting. But here goes my question and its a very simple one.

Can someone install a Keylogger on an iPhone which is not-Jailbroken and its running in its default factory state regardless if its iPhone 6 or iPhone 12 and regardless of whatever iOS version its running inside it? I personally read some Quora forum questions and many people were denying that iPhone is so secure that no kind of keylogger can be inserted/installed and hidden if that iPhone isn't "JailBroken". They were implying like the following quote from one of the guy replying to the question.

As long as your iPhone is not rooted you are safe (most likely the case).
The only other way someone can “hack” your iPhone is by going in through iCloud. Just make sure 2 factor authentication is turned on. Maybe change your password too and you’re good to go!
I’ve made keyloggers for Windows/Android/etc.…. it just can’t be done on iPhone without jailbreaking.

So I want the experts here to confirm if whatever this guy is saying, is true that iPhones are one of the most secure platforms in the world and no one can spy on it by merely installing a 3rd party keylogger app to spy on the owner of that phone unless and except if that iPhone is successfully jailbroken and definitely APPLE itself can see our data which is not a concern for me. My only concern is that no other 3rd person like someone from friends and family, can do a keylogging trick on someone's Locked non-jailbroken iPhone.

Thank you. Awaiting replies.

Best Answer

Yes, but only with the Apple ID & password.

This makes it really a parental tool on a child's account rather than a general threat to regular users.

There's a list here of some of the better-known loggers, but most are jailbreak only, the others need AppleID details.
https://janetcpatterson.medium.com/top-10-best-keyloggers-for-ios-771d85b2d330