Host Card Emulation (HCE) is not currently possible on iOS.
It is possible on Android, I'm not experienced with Android development so I can't give any help on the programming side of things other than to point you to the documentation.
Note: it has limitations for copying/cloning arbitrary cards.
See this answer by Michael Roland
Many access control systems use the card ID (UID) to identify the card (or even to make an access control desicion!). With Android HCE, an app cannot set the emulated card ID.
Many access control systems use cards/acces tokes that are not based on ISO 14443-4 (ISO-DEP) + ISO 7816-4 smartcard protocol. With Android HCE an app can only emulate smartcard applications that use ISO 7816-4 APDUs and application structure.
Even if the access control system does not use the card ID and uses an ISO 7816-4 smartcard application, it is very likely that the card contains some cryptographic secret (secret key) that cannot be extracted from the card through smartcard commands.
Another option worth considering is using an NFC enabled wallet passes for both Android and iOS. It's a good bit more complicated but it's end product is quite similar. At PassNinja we are trying to make the process of creating, distributing and reading NFC mobile wallet passes easier.
Disclaimer: I work for Flomio, the company behind PassNinja.