Has anyone solved this yet? I have Xcode 12.4 and created a trivial project (Objective-C) that links in a simple other project (for my base types). The other project has it's BaseTypes.h include the .h of the main code. This base project, KSBaseTypes, compiles nicely by itself.
// In this header, you should import all the public headers of your framework using statements like #import KSBaseTypes/PublicHeader.h
But when incorporated into the workspace of the test project, both the original BaseTypes.h won't compile, and any user of those types also aren't found.
#include KSBaseTypes/KSFrameworkRoot.h --error: 'KSBaseTypes/KSFrameworkRoot.h' file not found
The test main gets this error:
#import KSBaseTypes/KSBaseTypes.h --error: Could not build module 'KSBaseTypes'
As this is a trivial example, what is going wrong with frameworks? I'm not going to mess with search paths unless some Apple doc says so (I tried).
Also, the error on building when combined is:
/Users/scott/Documents/Xcode/ExampleFromWeb/KSBaseTypes/KSBaseTypes/KSBaseTypes.h:10:10: Did not find header 'KSFrameworkRoot.h' in framework 'KSBaseTypes' (loaded from '/Users/scott/Library/Developer/Xcode/DerivedData/ScottyTestTypes-bfwsyutnpcgxeuhbksuzfzelkbli/Build/Products/Debug-iphonesimulator')
So maybe the other .h files aren't pushed to this DerivedData folder? The other .h files are not in the public or private headers copy build phase (so I'm searching that issue).
SOLVED:
I had to manually add the .h files from the framework into the build phase (eg. KSFrameworkRoot.h) and it works nicely.
thanks.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: