This video will show you how to add your iPhone or iPad to the linked devices for your Apple TV to use as a WiFi remote control using the Apple TV Remote app in the app store (Works with Apple TV gen 2/3/4/5). I do not cover the iOS console Apple TV remote feature, which only works with Apple TV 4K and later models. The Apple TV will need to have a wired network or WiFi connection and a working remote you can use to enter a pairing code into the Apple TV settings.

source