更改静态库的源代码需要清理并构建xcode 4 [英] Changing the source of a static library needs clean and build in xcode 4

查看:213
本文介绍了更改静态库的源代码需要清理并构建xcode 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于我们在不同iOS项目中使用的框架项目构建的iOS项目。该框架作为xcode项目包含在app项目中。应用程序项目依赖于框架的静态库构建目标。 (类似于大多数开源库,如three20)

I have an iOS project that is built upon a framework project that we use in different iOS projects. The framework is included in the app project as an xcode project. The app project has a dependency on the framework's static library build target. (Similar to most open source libraries like three20)

问题是,如果我在框架源代码中更改某些内容,则在构建和运行时不会重建静态库应用程序项目。

The problem is that if I change something in the framework source code the static library is not rebuilt when I build&run the app project.

执行清理后跟构建和运行更改正确编译。每次我在框架中更改某些内容时进行重建都不是一个很好的解决原因。

Doing a clean followed by a build&run the changes are compiled correctly. Doing a rebuild every time I change something in the framework is not a good fix for obvious reasons.

是否有必须更改的设置以便xcode正确识别我的框架是脏的并相应地构建它?

Is there a setting that I have to changed so that xcode is correctly identifying my framework as dirty and builds it accordingly?

我正在使用xcode 4.0.2

I'm using xcode 4.0.2

推荐答案

这是xcode 4.0.2中的一个错误(可能会在将来的版本中修复)。来自 https://devforums.apple.com/thread/91711?start= 25& tstart = 0

This is a bug in xcode 4.0.2 (might be fixed in future version). From https://devforums.apple.com/thread/91711?start=25&tstart=0:


  1. 在项目中设置静态库,在框架下设置
    :相对于
    构建产品

  2. 关闭XCode

  3. 编辑project.pbxproj并删除静态库的所有路径组件,以便只显示filname像这样(重要的部分是path = libLibrary.a)

  1. Set static libraries in project, under Frameworks to: Relative to Build Products
  2. Close XCode
  3. Edit project.pbxproj and remove all the path components of the static library so that only the filname remains, like this (the important part is "path = libLibrary.a")

A74F787413566130000D0AFC / * libLibrary.a * / = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; };

A74F787413566130000D0AFC /* libLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; };

这篇关于更改静态库的源代码需要清理并构建xcode 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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