Apple will make the switch to USB-C|Karlis Dambrans|CC BY-NC 2.0

Apple confirmed that it will comply with the European Union (EU) law and switch to USB-C for iPhones. But the tech giant is not happy about being legally coerced to do it.

Apple's senior vice president of worldwide marketing, Greg Joswiak said on Tuesday at the Wall Street Journal’s tech event, “Obviously, we’ll have to comply,” when asked if the company would replace its own Lightning port.

The EU, to reduce e-waste, on Monday approved a final version of a law that requires all electronic devices sold and used in its 27-nation bloc to have USB-C ports by 2024.

Apple has already shifted to USB-C connectors on its Macs and iPads. The company claims that switching the iPhone from Lightning to USB-C would add to the e-waste but has agreed to comply.