iOS Simulator
How to set up iOS / iPad Simulator with Proxyman to capture HTTP/HTTPS Requests/Response
Last updated
How to set up iOS / iPad Simulator with Proxyman to capture HTTP/HTTPS Requests/Response
Last updated
In order to capture the HTTP/HTTPS message from your iOS Simulator devices, please navigate to:
Certificate Menu -> Install Certificate on iOS -> Simulators
It works for iOS, iPadOS, tvOS and watchOS.
The following photo describes three steps:
Install Root Proxyman Certificate on your machine: You can follow the macOS Guide.
Install Proxyman Certificate to all available simulators, which you have opened at least one time.
Reset the Simulator: Proxyman tries to reset all simulators, so it will load the new Certificate.
From Proxyman 2.19.0+, Proxyman uses the simctl command line to perform tasks.
simctl is built-in on your installed Xcode, which is more modern and reliable than the legacy approach (Use Python custom scripts).
This step only installs on Simulators, which you have open at least one time
For instance, if you would like to debug on iPhone X Simulator, please make sure to open the iPhone X Simulator first, then install the Certificate in Step 2
If you're using Xcode Preview for SwiftUI, you can install the certificate into the Xcode Preview Simulator by following:
Open Xcode with Previewer Mode (SwiftUI).
Open Proxyman -> Certificate Menu -> Install for iOS -> Simulator
Click on the Advanced button -> Install for Xcode Preview
You can read more at: https://github.com/ProxymanApp/Proxyman/issues/1568#issue-1610877870
In Proxyman v4.16.0 or later, you can manually install the certificate to your iOS Simulator in case the Automatic Solution doesn't work.
Certificate Menu -> Install Certificates for iOS -> Simulators
In Step 2, click on the ↓ button (Next to the Prepare Simulators button) -> Install Manually…
Drag and drop the certificate to your iOS Simulator
Open your iOS Simulator -> Setting app -> General -> About -> Certificate Trust Setting -> Find Proxyman CA Certificate and switch it ON
Done
If you get errors when clicking on Step 2, please open Xcode -> Preferences -> Location tabs -> Select your Xcode in the Command Line Tools.
Opening the Setting app -> General -> About -> Certificate Trust Settings and verifying that Proxyman Certificate is installed and trusted.
If it's not installed:
Open the iOS Simulator Setup (Certificate Menu -> Install Certificate on iOS -> Simulator) and click on the 2nd button.
Or Try the following step to manually install the Certificate.
Alamofire or URLSession might use the cached response for your request. As a result, the actual request doesn't hit the server. Thus, Proxyman could not capture and display it on the app.
Solution:
Disable the cache mechanism on URLSession or Alamofre.
Use the No Caching Tool (⌥⌘N)
If you cannot install the certificate, you can manually do it:
Open Proxyman -> Certificate Menu -> Export -> Root Certificate as DER -> Save to Desktop Folder
Open the Simulator drag the certificate and drop it on the Simulator screen
Open Setting app (on the Simulator) -> General -> Device Management -> Select the Certificate -> Install
Setting app -> General -> About -> Certificate Trust Settings and verifying that Proxyman Certificate is installed and trusted.
Done ✅
See detailed steps to debug an application on iOS Simulator with Proxyman