Using Charles with a 4th Generation Apple TV
Proxying network traffic through Charles is a common practice with iOS developers which helps us examine our application's API requests and responses. Since tvOS doesn't have a UI for setting an HTTP proxy, how is this done with an Apple TV? Answer: Custom Profile.
First download Apple Configurator 2 from the Mac App Store. This is how you'll add/remove profiles for your Apple TV.
Open Apple Configurator 2 and select File | New Profile (⌘N).
In the Global HTTP Proxy section add the IP address you want to proxy through.
Save the profile. It should have a .mobileconfig extension.
From the main Configurator screen, assuming you have your Apple TV connected via USB, right click on your Apple TV and select Add | Profiles... from the context menu. Select the .mobileconfig file you created in the previous step and click Add.
It should take a few moments to copy the profile to your device. Now run your app, approve the connection from Charles if needed, and watch the network traffic flow through Charles.
Except for SSL traffic. Here's how to get SSL proxying working too. This assumes you already have a Charles root certificate on your workstation. If not, see SSL Certificates on the Charles Proxy website.
Open Keychain Access, find your Charles Proxy Custom Root Certificate and make sure it's selected. Choose File | Export Items... and save the .cer file somewhere.
Switch back to Apple Configurator 2 and open the profile you had created previously. In the Certificates section click the Configure button and select the .cer file you exported in the previous step. Save the profile.
From the main screen of Apple Configurator 2, select your device and add the profile. Be sure to remove it first if needed. SSL traffic should proxy the same as everything else now.











