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
I could figure out why CFNETWORK_DIAGNOSTICS
is 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: