Hi
When using electronic accessories with your iPhone, ensure that they are either genuine Apple products or that they have been certified as Made for iPhone under the MFi program. Certified items come with the "Made for iPhone" logo on them and/or on their packaging.

Using uncertified or counterfeit accessories may damage your iPhone and/or adversely affect operation. Apple's warranty does not cover damage caused by use with a third party product that does not meet Apple's specifications.
If you are concerned that the Lightning to 3.5 mm Headphone Jack Adapter supplied with your iPhone may be faulty, then contact Apple Support (mail-based serviced may be available), make a Genius Bar reservation or visit an Apple Authorised Service Provider for assistance:
iPhone Service Answer Center - Apple Support
More information:
About iPhone, iPad, and iPod accessories - Apple Support
Identify counterfeit or uncertified Lightning connector accessories - Apple Support