Search code examples
iosinstruments

Is there any way to automate the functions of instruments?


I'm using instruments to measure the performance of my app. I need to do it regularly. So I don't want to test manually. Is there any way it could be automated??


Solution

  • If you use the same template all the time, such as the Time Profiler, you can edit the scheme to use that template when you profile your project. Choose a template from the Instrument menu.

    Scheme Editor Profile step

    When you choose Product > Profile in Xcode, Instruments will start profiling the project automatically without you having to choose a template or click the Record button.

    Any further automation, if possible, requires scripting, of which I have no solution for you.