The most common reasons for the Mogees sensor not being detector or not working properly is due to debris stuck inside the headphone jack.
Often the dirt can be very compacted at the back of the socket. You'll be amazed at how much dirt can get stuck there!
An example of lint compacted at the back of the headphone socket.
If you shine a torch into the socket and do not see a shiny metal surface at the back of the socket then you'll need to clear the headphone socket.
Use a small tweezers or cocktail stick to dislodge the dirt from the back of the socket. This can be tricky and can take a few minutes of trying before the material comes out.
Using a tweezers to pinch and pull out the dirt.
You should be able to see a clear and shiny surface reflecting at the very back of the headphone jack when it is clear.
Lint removed from a headphone socket.
Be gentle! Mogees isn't responsible for any damage to your iOS device resulting from cleaning the socket!