如何防止Xcode每次都重建项目 [英] How to prevent Xcode from rebuilding project every time

查看:27
本文介绍了如何防止Xcode每次都重建项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Mac OS X 应用程序,它由一个主要目标和一个依赖框架组成.自从在我的 Mac OS X 应用程序上启用代码签名后,我注意到每次运行时 Xcode 都会重建主目标,即使我没有接触过一行代码.

I have a Mac OS X app that consists of a main target and a dependent framework. Since enabling code-signing on my Mac OS X app, I noticed Xcode rebuilds the main target every time I run it, even if I haven't touched a line of code.

这是一个问题,因为依赖框架需要知道主目标文件的CRC.每次 Xcode 重建主目标时,CRC 都会发生变化.

This is a problem because the dependent framework needs to know the CRC of the main target file. Every time Xcode rebuilds the main target, the CRC changes.

在代码签名之前,我会构建一次主目标,生成 CRC,将 CRC 输入到我的框架代码中,然后再次构建主目标.Xcode 只会注意到框架发生了变化,因此不会重建主目标.

Before code-signing, I would build the main target once, generate the CRC, enter the CRC into my framework code, and build the main target again. Xcode would notice only the framework changed so it wouldn't rebuild the main target.

有什么建议吗?

推荐答案

在 Xcode 中实际上有一个选项可以在不首先构建代码的情况下运行.选择产品">执行操作"下的无需构建即可运行"选项.热键是 ctrl + cmd + R.

There is actually an option in Xcode to run without building the code first. Select the "Run Without Building" option under Product > Perform Action. The hotkey for this is ctrl + cmd + R.

这篇关于如何防止Xcode每次都重建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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