A little utility that pre-authorizes Instruments to run UIAutomation scripts against iOS devices
(if you're using Appium, check the Appium docs for how to call this function. The document you are reading is for developers who are using this npm package, not Appium users)
npm install authorize-ios
This will bring up an alert that prompts the user to input their sudo password. There's no away around this.