Charles cannot detect ios background mode network requests

Set up Charles well, and can monitor the network requests on the app, when the app is in foreground. The app receive a background notification, will trigger to make a api call. But the api call cannot be shown in Charles when the app in backgroud.

Do ios do some disguise for background network request, so that cannot be shown in Charles? Or it should can be monitored, additional settings required? thx for anyone could share related experience

Accepted Reply

Sorry, my mistake. update on this. Background mode, api request could be monitored by Charles. APNS payload need add "content-available": 1 to trigger background mode. In my case, actually, the code is not triggered, so no network calls.

Thanks for ur answer and suggestions.

Replies

AFAIK debugging HTTP proxies should be able to see traffic regardless of where it comes from. The only thing to check is that the traffic is going over Wi-Fi rather than WWAN. A good option there is to simply disable WWAN.

Have you tried using the HTTP Traffic instrument for this? It and a debugging HTTP proxy have different pros and cons, but I’ve found it very useful.

See Analyzing HTTP Traffic with Instruments for more.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Sorry, my mistake. update on this. Background mode, api request could be monitored by Charles. APNS payload need add "content-available": 1 to trigger background mode. In my case, actually, the code is not triggered, so no network calls.

Thanks for ur answer and suggestions.