I have a XCode projects with target dependencies, which build without issues via XCode and xcodebuild. I'm creating an automated build with Jenkins and having issues with paths to dependent files.
The first project is independent with the following file hierarchy: -
The second project includes the project 1 header, as defined with 'Relative to Project': -
Jenkins is being used with a git server to checkout the projects, but this changes the hierarchy: -
Since Jenkins builds into a separate "Workspace" folder, the reference to project1.h is now broken.
I could fix this by scripting the build process by hand to checkout and build both projects, but this defeats the purpose of using Jenkins in the first place!
So, is it possible to update the relative path via xcodebuild, or is there a better way of dealing with the change in the folder hierarchy when using Jenkins?
I think for project2, you can use the Multiple+SCMs+Plugin. Define both project1 and project2's repo in SCM settings and you should be able to get the old folder hierarchy.