How to Use Charles Proxy on the Xcode 6 (iOS 8) Simulator

iOS 8 / Xcode 6 Simulator is not using HTTP Proxy anymore

Restart the simulator between proxy changes

How to use Charles Proxy on an Xcode Playground?

Unlike the simulator, Playgrounds don't have their own network configuration. If you need a proxy on a Playground then you need to proxy your Mac's network connection. That will affect every app on your Mac, which is potentially a lot of data. It should work but you might want to quit any other network-related apps that you can. If you don't need to use your browser while testing, for example, quit it until you're done.

Unable to install Charles root certificate on iOS Simulator 14.5

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.

Sample Image

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.

How to get Charles working with Xcode 7 on SSL connections?

I solved the issue based on this thread:
https://forums.developer.apple.com/thread/4988

iOS 9 (which the Xcode 7 emulators run) has stricter requirements for SSL transport - from user "Poets" in the above thread:

iOS 9 forces connections that are using HTTPS to be TLS 1.2 to avoid
recent vulnerabilities. In iOS 8 even unencrypted HTTP connections
were supported, so that older versions of TLS didn't make any problems
either. As a workaround, you can add this code snippet to your
Info.plist:

<key>NSAppTransportSecurity</key>  
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>

This enables Charles to show you unencrypted traffic when using iOS 9 emulators. You'll likely want to disable this once you distribute your apps.



Related Topics



Leave a reply



Submit