Multiple projects using the simulator

拥有回忆 提交于 2019-12-06 16:11:33

There is a little bit of doing involved in making this happen but overall it's pretty easy.

The first thing you'll want to do is open Automator. Incase you've never used it before, it is included on your mac so just search it. When Automator launches, you will be prompted to create a new project, select "Service."

Then adjust the service receives section as follows

On the left side of Automator, you'll see a search pane, search for "Run Applescript" and then drag the instance of "Run Applescript" under your service receives section.

Now you're going to want to change the applescript to suite your needs. In this case you'll replace "(* Your script goes here *)" with "tell application "iPhone Simulator" to quit"

Once you're done altering the Applescript, save the automation as whatever you'd like, it will show up in Services under this name.

Now you're going to head over to "System Preferences" and search "services"

As you can see, I named my Service "Quit Simulator" select yours and define whatever shortcut you want for it. (Try not to conflict with existing shortcuts!)

And now if you encounter the "Simulator in use" error you can quit the simulator, ending any current process with a simple keystroke.

Hope this helps!

Each run is dependent to their project window (as far as I know). So you'll have to go to the project window and stop the build, or simply quit the Simulator (cmd+q) and build again in your new project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!