Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 iOS 应用程序,它依赖于网络服务器来跟踪玩家和游戏等信息。每次在模拟器中启动应用程序时,有什么方法可以让 XCode 重新启动服务器?我正在使用 Django,因此启动服务器涉及一个终端命令。
转到您的目标设置并添加一个构建阶段。您可以设置在每次构建时运行的任意脚本。
这是我的一个项目中的一个示例:
只需单击右下角的Add Build Phase图标,然后选择Add Run Script。正如您自己很容易发现的那样,您可以指定运行脚本的 shell 以及其他方便的选项。
在您的具体情况下,一个简单的 oneliner
python manage.py runserver
可能会成功