So i am trying to save a log file and then open it in my office.
I have tried "Willow" and "CocoaLumberjack" yet i fail.
I have tried the open console yet it shows logs only from the time i connected the device to the mac. Also tried:
NSLog("example")
and
let customLog = OSLog(subsystem: "com.your_company.your_subsystem_name", category: "Category")
os_log("This is info that may be helpful during development or debugging.", log: customLog, type: .debug)
Am i doing something wrong or there is other way?
Thanks
Ok so i managed to do so with "CocoaLumberjack" pod.
Pretty much as in the documentation.
I have created a file like so:
In appDelegate i did this:
And then wherever i wanted to write a log i did like so:
After finishing i had to extract the log like so: windows -> devices and simulator -> choose the device -> choose the app -> scroll down to the gear icon -> download container -> then show package contents -> library/caches/logs :)