How to execute a bash script in XCUITest teardown func?

Scenario: I have an XCUITest for an iOS application and I want to call leaks tool on tearDown function.

 leaks App_Name --outputGraph=~/Desktop/Foo.memgraph

I want to ask that is there a way I can call a script in tearDown function? Thank you

How to execute a bash script in XCUITest teardown func?
 
 
Q