11

I am having trouble getting Charles Proxy to work with my iOS 11 simulator. It appears that I cannot get the simulator to trust the certificate. I go into General -> Settings -> About -> Certificate section and click the button to trust the cert. Then when I exit the settings and come back the switch is reset to untrusted. I can't get the setting to stick. Is anyone else having this issue?

Cliff
  • 10,586
  • 7
  • 61
  • 102
  • 3
    I can't even find the button in certificate trust settings to trust the cert, on ios 11 xcode 9 simulator. Managed to trust the certificate tho as per configuration profile settings. – Pranav Kasetti Oct 08 '17 at 13:38
  • Same here. I think this is one of many bugs in this version of simulator – Siyu Nov 02 '17 at 18:04
  • @PranavKasetti Could you elaborate on how you managed to trust the certificate? I don't see in the profile settings anywhere to trust the cert. – Richard Nov 29 '17 at 09:50
  • @Richard a trust option pops up automatically in settings when you try and download the certificate from safari. – Pranav Kasetti Dec 03 '17 at 14:11
  • My problem ended up being that I was using a partially qualified domain name, e.g https://test instead of a fully qualified name e.g. https://test.local. Frustrating as it had been working fine for literally years before that with the partial name. – Richard Dec 06 '17 at 06:55
  • Hi @Richard, could you elaborate on this? I'm also running into this issue. Do you mean the certificate you're using needs a fully qualified name? If you're using the Charles Proxy default certificate you don't really have the option of specifying this. – awolf Dec 11 '17 at 18:20
  • @awolf I should’ve said I wasn’t using charles proxy, just creating a cert via keychain cert assistant. Seems you solved this anyway. – Richard Dec 16 '17 at 21:32
  • Starting from iOS 10.3 SSL trust for the certificate has to be turned on manually for the manually installed certificate profiles in iOS so go to **Settings > General > About > Certificate Trust Settings**. Under **Enable full trust for root certificates turn on trust for the certificate** – Durai Amuthan.H Feb 20 '18 at 18:42

1 Answers1

5

I had this problem too. I'd toggle the checkbox in my iOS Simulator's Settings.app but it wouldn't stay toggled on.

I found that the Charles Proxy certificate was not trusted on my Mac. Trusting it on my Mac, quitting Xcode and iOS Simulator and relaunching fixed my problem.

Open Keychain Access, choose "login" on left hand pane. Right click the Charles Proxy CA entry and select Get Info.

enter image description here

In the screen that pops up, expand Trust, and select "Always Trust".

Quit relaunch Xcode and iOS Simulator and all should be well.

awolf
  • 1,862
  • 22
  • 29
  • 1
    It's important to note that order of operations matter. (At least from my experience). First install root certificate on mac. Second go to keychain and trust. Lastly remove any previous Charles profiles on simulator and install the new profile on simulator from Charles help menu or visiting the url. http://www.charlesproxy.com/getssl – nsuinteger Feb 19 '18 at 10:47