Unable to install Charles root certificate on iOS Simulator 14.5

ProxyCharles Proxy

Proxy Problem Overview


On Charles mac app, if I go to

> Help > SSL Proxying > Install Charles Root Certificate on iOS > Simulators

and then run any Simulator from Xcode I don't see Charles certificates installed on simulator.

I am using Charles v4.6.1. This was working fine on iOS Simulator 14.4. If you have any solutions please let me know.

Proxy Solutions


Solution 1 - Proxy

It's a bug from Charles Proxy. You should wait until Charles Proxy fixes it.

To work around, you might manually export the certificate from Help Menu -> SSL Proxying -> Save Charles Proxy Root Certificate.

Then drag the file to iOS Simulator. Then trusting it by Going to Settings app -> General -> About -> Certificate Trust Settings.

enter image description here

Or You can install and trust the certificate by using simctl CLI

xcrun simctl keychain booted add-root-cert <your_certificate>

If you prefer automation work, do it with one-click, you might checkout Proxyman, which is a modern version of Charles Proxy.

It also fully supports Xcode 12.5, iOS 14.5 Simulators, Big Sur, and M1 Macbook.

proxyman-ios-14.5-simulator

Disclaimer: I develop Proxyman app. Hope that it helps you.

Solution 2 - Proxy

You can try this (for any new simulator). This process still work with simulator 14.5 and iOS 15

  • Open charles and configure it as its Proxy. In Charles see that, Proxy-> macOS Proxy is enabled.

  • From the iDevice, open https://chls.pro/ssl with Safari Browser. enter image description here

  • It will ask to download the certificate. Just download it. The certificate will be ready to be installed enter image description here

  • Open Settings/General/Profile/Download Profile to install the certificate (Profile link in settings appear only after downloading profile from https://chls.pro/ssl). In iOS 15, the profile can be found under Settings/General/Device Management. enter image description here

  • Open Settings/General/About/Certificate Trust Settings to accept the newly installed certificate enter image description here

Solution 3 - Proxy

No need for a workaround anymore. Just update Charles to 4.6.2 version.

You can download it from the link above: https://www.charlesproxy.com/download/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSNKView Question on Stackoverflow
Solution 1 - ProxyNghia TranView Answer on Stackoverflow
Solution 2 - ProxyDuyen-HoaView Answer on Stackoverflow
Solution 3 - ProxyKwnstantinos NikoloutsosView Answer on Stackoverflow