RestKit/RestKit.h' file not found error during

2020-03-25 09:00发布

I am trying to use Jenkins-CI to auto-build an iOS project that uses Restkit, apparently, restkit resides as a project inside the main project. And the project builds successfully using the XCode-IDE.

But when i use xcodebuild(jenkins uses it, and i did simulate the same) to build the project it gives the

error RestKit/RestKit.h file not found

Any clue whats going wrong, can this be corrected by using scheme file? If so how? or can I simulate, how XCode-IDE deals with this?

3条回答
Emotional °昔
2楼-- · 2020-03-25 09:06

I have exactly same problem. My solution:

firstly you have build RestKit. After than, you can build your project.

If you run script from you project's top directory and restkit is in RestKit folder:

xcodebuild -project RestKit/RestKit.xcodeproj -target RestKit -sdk iphonesimulator -configuration Debug clean build

Then you can build you project.

If this isn't enought, add to "Header search paths" this two :

"$(BUILT_PRODUCTS_DIR)/../../RestKit/Build/Headers"
"$(BUILT_PRODUCTS_DIR)/../../Headers/RestKit"

And beware, you have to add this to all targets

查看更多
forever°为你锁心
3楼-- · 2020-03-25 09:07

I don't think am answering this question, but a proper workaround this would be making use of XCode Schemes. Also one should mark the particular scheme as Shared.

These links can serve helpful

http://tetontech.wordpress.com/2011/05/26/command-line-building-using-xcode/

http://developer.apple.com/library/ios/#recipes/xcode_help-scheme_editor/Articles/SchemeManage.html

查看更多
Anthone
4楼-- · 2020-03-25 09:23

I guess your problem is the same as "Xcodebuild'ing a workspace and setting a custom build path". Set the SYSROOT with absolute path, default is relative path.

查看更多
登录 后发表回答