Since iPhone 7, Apple smartphones have been shipping with wired EarPods that connect to the Lightning port, but that prevents you from using them with your USB-C based Mac or 2018 iPad Pro without a special adapter, like this little new dongle from accessory maker Anker.
Anker’s USB-C audio dongle lets you use your iPhone headphones with a Mac or iPad Pro