It seems that the directory for the iOS Simulator has changed. It used to be in ~/Library/Application\\ Support/iPhone\\ Simulator/
and now it\'s in ~/Lib
-
Just (re)starting the Simulator after Charles starts fixed it for me.
讨论(0)
-
To me, this is what worked.
I did same thing as we do in device.
- Open safari and browse chls.pro/ssl
- Accept and install the certificate
- Go to Settings/About/Trust certificates and trust the charles certificate.
I have to do this on 3 simulator instances, as XCUI automation testing can spin 3.
讨论(0)
-
According to charles documentation
The iOS Simulator should use the system proxy settings. If it doesn't, please try quitting and restarting the iOS Simulator. As of Xcode 6 it appears to be important that Charles is running and set as the Mac OS X system proxy before you run the iOS Simulator.
Read Here
So just quit your simulator, open charles and then run the app again. After that you can track your network calls.
NOTE: Your network calls will fail if you quit Charles. So you will need to either quit the simulator and run it again or open Charles again.
讨论(0)
-
Check this out:
As of Charles v3.9.3 there is an item in the Help menu, "Install
Charles CA SSL Certificate in iOS Simulators", which will
automatically install Charles's SSL CA certificate in your iOS
Simulators.
Alternatively, you can change your code so that NSURLConnection
accepts any SSL certificate. Please see the question and answer on
Stack Overflow:
How to use NSURLConnection to connect with SSL for an untrusted cert?
You can check it on this link: http://www.charlesproxy.com/documentation/faqs/ssl-connections-from-within-iphone-applications/
讨论(0)
-
The 'Install Charles Root Certificate in iOS simulators' does not work in the current version of CharlesProxy (3.11) with Xcode 7 / iOS 9 simulators.
Instead, use the 'Install Charles Root Certificate on a Mobile Device or Remote Browser...' option. This will give you a url for the certificate.
If you open this url in Safari in the simulator, you will then be given the option to install the certificate.
You still then need to disable app transport security. I don't understand why this is necessary when you have the certificate installed; I guess CharlesProxy does not use sufficiently large keys/signatures.
讨论(0)
-
Steps for iOS simulator.
- Install Charles - download
- Charles Menu -> Proxy -> Enable Mac Proxy
- Charles Menu -> Tools -> Proxy -> Proxy Settings -> MacOS -> Check all the check
boxes
- Install Charles Certificate in iOS simulators
- Charles Menu -> Help -> SSL Proxying -> Install Charles Ceritificate in iOS
Simulators
- Enable Charles Certificate in iOS Simulators
- iOS Simulators Setttings -> General -> About -> Certificate Trust Settings -> Switch
On
- If traffic does not appear, Run Charles before simulator
Steps for iPhone/iPad.
- Open desktop Charles app (Mac/Windows)
Goto Charles Menu -> Help -> SSL Proxying -> Install Charles Ceritificate on a Mobile device or Remote browser -> Select -> popup appear with below steps
`
Configure your device to use Charles as its HTTP Proxy on
192.168.0.100:8888, then browser to chls.pro/ssl to download and install the certificate.
Goto iPhone settings -> Wifi -> click selected wifi -> Http proxy -> Configure proxy -> select Manual -> Give server as 192.168.0.100 and port as 8888 -> Save
Goto iPhone browser -> Load chls.pro/ssl -> It will show below popup
`
The website is trying to download a configuration profile. Do you want to allow this?
Ignore button and Allow button
Click Allow button -> It will download the profile
- Goto iPhone Settings -> General -> Profiles -> Downloaded Profile -> Select the Charles Proxy profile -> Install
- Goto iPhone Settings -> General -> About -> Certificate Trust Settings -> Enable - Charles Proxy CA certificate
- Now we can track the iPhone app calls in desktop Charles app
讨论(0)
- 热议问题