Jason Xu
Jason Xu

Reputation: 2963

Http traffic of cocos2d-x app not exist in Charles Proxy

My game app is based on cocos2d-x/iphone and it will request Json or Html from a Django server. Things work fine if I open urls of server request in iPhone Safari browser inside simulator or device and also PC browser, traffic shows up in Charles. But for running the app on ios simulator or iphone device, traffic not found in Charles. Softwares are all of newest version.

Any guy have same problem and give me some clues on it? Thanks.

Upvotes: 0

Views: 911

Answers (2)

oylbin
oylbin

Reputation: 148

The problem should be your cocos2d-x app use libcurl, and do not set CURLOPT_PROXY option in your code.

Upvotes: 1

S.P.
S.P.

Reputation: 3054

You need to configure it properly

  1. From the Help menu, choose Install Charles CA SSL Certificate… (HTTPS traffic)
  2. From the Proxy menu, choose Client SSL Certificates… Enable SSL Proxying
  3. From SpotLight search "Network Utility" and find your IP Address
  4. Open up Safari and enter http://charlesproxy.com/charles.crt in the browser
  5. Install the certificate
  6. Open up your iPhone Settings application and tap on Wi-Fi settings. Tap on the blue disclosure indicator of your local Wi-Fi network
  7. Scroll down to the bottom of your Wi-Fi settings and tap on the Manual segment control in the HTTP Proxy settings.
  8. Enter in the IP address you wrote down from your Mac running Charles. as well as the default port Charles runs on, 8888
  9. To verify your settings, open up Safari on your iPhone. As soon as you make an Internet request, Charles will prompt you on your Mac with a mesage box like the following. You want to click on the Allow button.

All the above information I have copied from Here

Upvotes: 1

Related Questions