jonathanpenn/ui-screen-shooter

Use -w parameter of instruments command

Closed this issue · 5 comments

After I upgraded to Xcode 5.1.1, ui-screen-shooter stopped working with 3.5" iPhone retina screenshots. I did a little digging, and I think I've found a better way than AppleScript to select the correct simulator. The instruments command had a -w parameter, which takes the name of a device or simulator to use. Run instruments -s devices to see a list of available devices and simulators.

I think the use of AppleScript should be replaced with the use of the -w flag to set the simulator directly. @jonathanpenn I would like to hear your thoughts, and then I will work on it and submit a pull request.

Yeah, the -w parameter only used to choose attached devices by UUID. They just changed it wil the latest Xcode release. Check the master branch of this repo. I've already removed all the AppleScript and did what you suggested.

Oh snap! Well I guess I'll do that then. I'll check out your implementation and see all the things you did better than me 👅

Hey, not better. Great minds think alike, and all that. :)

I was trying to parse the output of instruments -w devices, but I prefer your approach of just asking the user to populate the list.

I had originally made this project as an example to show you how to do it yourself, not as a drop in tool. But it's slowly becoming a tool with all the contributions. If you have an idea to had in the simulators you want (or use a config file?) go ahead and suggest it.