Connecting IPhone 7plus to lavalier mic?

I'm using a 3.5mm lavalier microphone and have it connected to the lightning adapter that came with the phone but it isn't working! When I record it uses the audio from the phone mic itself instead of the external microphone. I've also gotten an error message that says "this accessory is not supported by this iPhone." Do I need another adapter? What could be the problem?

It's not supported by your iphone operating system. An adapter will do nothing. Look at the lav mic specs to determine what operating system is compatible

You probably got the one that is for windows…

https://www.amazon.com/...B016OKE154

try that one…