Prior to Xcode 12.5 you could install the Charles Root Certificate by the menu item in Charles:
Help > SSL Proxying > Install Charles Root Certificate in iOS Simulators
This no longer works as of 12.5. But you can still do it manually. Follow these steps.
- From the Charles Application Menu, choose: Help > SSL Proxying > Save Charles Root Certificate…
- Save the file: “charles-ssl-proxying-certificate.pem” to your Desktop.
- Launch the iOS Simulator. Drag “charles-ssl-proxying-certificate.pem” from your Desktop on to the simulator.
- Then enable the certificate in the iOS Simulator by going to: Settings > General > About > Certificate Trust Settings and flipping the switch On for Charles Proxy CA