如何在Xcode构建完成时设置警报? [英] How to setup an Alarm on Xcode build finish?

查看:95
本文介绍了如何在Xcode构建完成时设置警报?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个从事大型iOS项目的懒惰iOS开发人员。我已经应用了许多优化措施来减少我的项目构建时间,但是每次构建都需要10到12分钟以上的时间。我开始构建,有时构建完成时,我在桌上睡着了。有没有办法将任何语音/响铃警报与xcode构建系统集成在一起,以便在构建成功或失败时立即通知我下一步操作。

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. 添加项目的运行脚本阶段。

  1. Add "Run Script" phase of your project.

键入 afplay ,然后在计算机上输入一些声音文件。您可以使用 / System / Library / Sounds 目录中的一种很短的声音,例如:

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:

只需选择您想要的任何声音文件( (最可能是受DRM保护的内容除外),并添加该文件的 afplay 作为运行脚本阶段的最后一步。您可能想要一些足够长的时间来引起您的注意,但又不要太烦人。也许考虑获取一些铃声(例如m4r文件等),然后尝试一下。

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.

这篇关于如何在Xcode构建完成时设置警报?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆