How to let instruments - app launch template wait for process to launch , rather than actively launch by instruments

Hi there,

How to let instruments - app launch template wait for process to launch , rather than actively launch by instruments?

I need to profile the app launch performance when clicking a push notification or cold launch via a url link. How to let instruments to wait for the process and collect the data?

Currently, I tried the command

xctrace record --template "App Launch"
--attach MyApp
--device-name 'Phone-Dev'
--output mytrace.trace

But it soon failed with 'Cannot find process matching name: MyApp'. How to make it work?

How to let instruments - app launch template wait for process to launch , rather than actively launch by instruments
 
 
Q