Why do I sometimes get a green dot on my picture when I shoot towards the sun?

I have an iPhone X
Hi there,
I'm not quite sure but it could be caused by a glare. Hopefully, someone will be able to help you out soon.
It’s a lens flare. The sun strikes the glass at the right angle and you get a flare.
It’s a lens flare. The sun strikes the glass at the right angle and you get a flare.

This is a side note but I'm amused with your username and the answer you gave here. That totally makes sense though as it's something I never thought about before this thread.
It’s a lens flare. The sun strikes the glass at the right angle and you get a flare.

Yup. I use TouchRetouch to get rid of it if I have to:

https://itunes.apple.com/us/app/touchretouch/id373311252?mt=8&at=10l3Vy

Original thread: https://forums.imore.com/threads/why-do-i-sometimes-get-a-green-dot-on-my-picture-when-i-shoot-towards-the-sun.406810/