xcode - xcodebuild cannot find header in embedded projects -
i have project embed project, , xcode gui build successful, in command line xcodebuild failed such.
fatal error: 'ohattributedlabel/ohattributedlabel.h' file not found #import <ohattributedlabel/ohattributedlabel.h> ^ 1 error generated.
but had in project header search path (where h located)
${project_dir}/myproject/vendor/ohattributedlabel/source
the problem header located in "ohattributedlabel/source" folder, while import statement looking header under ohattributedlabel folder, don't want touch embedded project directory structure, can in case?
the best way modify embedded project publish header files:
- select embedded project in xcode
- select applicable target.
- click on build phases
- expand "copy headers" section , add ohattributedlabel.h file.
- select main project
- select applicable target.
- click on build phases.
- click on target dependencies.
- make sure embedded project added dependency.
- try run app
if above doesn't work double-check order of build phases. e.g. make sure "target dependencies" build phase before "compile sources".
Comments
Post a Comment