Install Certificate for iOS Simulators on Xcode 12.5
This mini-blog would demonstrate how to install the Proxyman/Charles Proxy certificate to iOS Simulators from Xcode 12.5.
1. Problem
From Xcode 12.5, Proxyman (prior 2.20.0 version), Charles Proxy, and Fiddler could not install the certificate to iOS Simulators. It worked fine before Xcode 12.5
The reason behind the scene is that Proxyman, Charles Proxy, and Fiddler used to use a custom script to directly install the certificate to iOS Simulator's TrustStore, and it is not allowed in Xcode 12.5 for security reasons.
2. How to fix it
2.1 Manual
Charles Proxy
- Export Charles Proxy's certificate by Help Menu -> SSL Proxying -> Save Charles Proxy Root Certificate
- Save it to your Desktop Folder
- Drag it to your iOS Simulator
- Go to Settings app -> General -> About -> Certificate Trust Settings
- Turn on the certificate
- Enjoy!
Fiddler
Same with Charles Proxy guideline.
Use simtcl
It is easier if we use the simtcl
, which is a helper command line that allows the developer to interact with iOS Simulators.
- Export the certificate to Desktop
- Open the iOS Simulator
- Open Terminal and execute the code
xcrun simctl keychain booted add-root-cert <your_certificate_path>
- Enjoy!
2.2 Automation
From Proxyman 2.20.0, you can automatically install and trust the certificate to iOS Simulator seamlessly. It works fine Xcode 12.5
Here is the guideline:
- Open Proxyman app
- Open your iOS Simulators
- Certificate Menu -> Install Certificate to iOS -> Simulator
- Follow the guideline
- Enjoy!
3. What's next
If you are a new user, please check out the iOS Simulator Tutorial at https://proxyman.io/blog/2019/07/Debugging-on-iOS-Simulator-with-Proxyman.html
Proxyman is a high-performance macOS app, which enables developers to capture HTTPs traffic on iOS device, iOS Simulator and Android devices.
Get it at https://proxyman.io