Search code examples
iosswiftappdelegateios14cfnetwork

App Transport Security verbose is not working ios 14.1


I configure CFNETWORK_DIAGNOSTICS in edit my schema App set the level to 3. and added code snippet to my AppDelegate function didFinishLaunchingWithOptions setenv("CFNETWORK_DIAGNOSTICS", "3", 1) compile the app and I don't have log CFNetwork diagnostics log file created in my console in the simulator console or folder


Solution

  • I could figure out why CFNETWORK_DIAGNOSTICSis not working with XCode 12.1. I found this Github project to profile web request from an actual device just add this snippet code for AppDelegate

    // AppDelegate
    import netfox
    NFX.sharedInstance().start() // in didFinishLaunchingWithOptions: 
    

    https://github.com/kasketis/netfox/blob/master/README.md