Manu Kanthan Manu Kanthan - 1 year ago 83
iOS Question

Raise exception on App Transport Security?

Under iOS 9, I've used the accepted answer here: Transport Security has Blocked a cleartext HTTP

I added the entries to my Info.plist file under

. My app seems to be functioning properly, as well as executing all of the requests for which I've accounted for. I am still receiving the error:

App Transport Security has blocked a cleartext HTTP (http://) resource
load since it is insecure. Temporary exceptions can be configured via
your app's Info.plist file.

My problem is that I can't find where in my app codebase this is coming from and I do NOT want to allow all domains (lazy option referenced in the accepted answer I credited). Is there a way to raise an exception for it so that I can find the source of the warning?

Answer Source

Using this link ( from the comment above, I found that switching the environment variable CFNETWORK_DIAGNOSTICS to 1 produces a detailed log of all the requests.

This allowed me to trace the requests coming from a webView where I'm loading my own domain, which in turn loads things like MixPanel and Google Analytics. Entering those domains into the Info.plist file fixes the issue, however, we're instead simply going to load the https versions of these libraries.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download