How to setup an Alarm on Xcode build finish?

删除回忆录丶 提交于 2020-02-04 08:44:42

问题


I am a lazy iOS developer working in a large iOS project. I have already applied many optimisations to reduce my project build time but each builds taking more than 10~12 mins. I start building and by the time builds finished sometimes, I fall asleep on my desk. Is there any way to integrate any voice/ring alert with the xcode build system so that when build is succeeded or failed I will be notified immediately for my next action.


回答1:


You can

  1. Add “Run Script” phase of your project.

  2. Type in afplay followed by some sound file on your computer. You can use one of the really short sounds found in the /System/Library/Sounds directory, for example:

Just pick any sound file you’d like (other than something protected by DRM, most likely) and add afplay of that file as the last step in a “Run Script” phase. You probably want something long enough to get your attention, but not so long as to be annoying. Maybe consider getting some “ringtones” (e.g. m4r files or the like) and trying those out.




回答2:


Finally I got an option to set up success and failure sound clip from

Preferences > Behaviours



来源:https://stackoverflow.com/questions/59498121/how-to-setup-an-alarm-on-xcode-build-finish

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