Apple (AAPL) will make the jump to USB-C charging after the European Union passed a law mandating electronic devices have a common charging standard, a company executive announced Tuesday.

"Obviously, we'll have to comply," Greg Joswiak, Apple senior vice president of worldwide marketing, said at the Wall Street Journal's Tech Live conference.

EU member states formally voted on Monday to pass the landmark law requiring Apple and other electronics makers to adapt smartphones, tablets, portable speakers, and other small devices to the new charging standard.

Apple's iPhone currently uses its proprietary lightning charger, making the global giant among the most affected by the new legislation.

Some Apple Mac computers already use USB-C charging, but none of its other products come equipped with the capability and would have to be redesigned.

Under the new law, Apple will have to move away from lighting charging by 2024, as the EU hopes to streamline the number of chargers and cables consumers must deal with when they purchase a new device.

According to the Journal, Apple opposed the ruling, claiming the uniform charging standard will stifle innovation.

"We think the approach would have been better environmentally and better for our customers to not have a government be that prescriptive," Joswiak said, referencing Apple's soon-to-be-obsolete lighting cables.

Apple has yet to state whether they will adapt USB-C charging in their products outside of EU member countries.