A patent Apple was published on the network on how iPhone could replace your driver's license, passport and other documents.
The document outlines how the system could import personal data from various sources and then present it to the authorities via the device. For data security, you can use the RFID system or NFC.
The patent also mentions the growing popularity of electronic passports with chips that store user data. The same system could be used on smartphones.
Apple does not indicate exactly iPhone as an electronic device on which the data will be stored, but that would be the most logical. iPhone already has support for NFC, and Touch ID and Face ID make your data even more secure.
Let's see if iPhone can ever replace a regular passport. The technology is very real, but it is not known if its use of power will be allowed. By law in many countries, citizens are required to carry a physical identity document, and this is unlikely to change. Still, it's nice to know that Apple never stops thinking about new ways to use their devices.
It is worth noting that from year to year Apple many technologies are patented, of which only a few become reality.