You can use a harmony hub. That's what I have. It's a small IR hub that can control many devices and be controlled from your phone.
You can buy a cheap IR dongle too that plugs into the headphone jack of some phones but its big and hangs off the phone like a sore thumb, not something to have on your phone all the time.
http
/www.logitech.com/en-us/harmony-remotes
Any of the hub's can be controled with a phone, or the remote if you get a remote version.
http

/www.irdroid.com/ Or that hanging off your phone with a battery. lol.