I was having some trouble when archiving a project with a swift bridging header, and a framework. It was giving me errors, but only when I Archive. So I made a new project to test this further.
Here are my steps:
- New swift project.
- Add an objective-c file.
- When it prompts me to ask about making a bridging header, press yes.
At this point, I archive. It succeeds.
- Add ASyncDisplayKit.xcodeproj
- Add libAsyncDisplayKit.a, AssetsLibrary and Photos to "Link Binary With Libraries" build phase.
- Add "-lc++ -ObjC" to project linker flags.
- Add
#import <AsyncDisplayKit/AsyncDisplayKit.h>
to the bridging header.
These are the instructions found here.
I archive again, and it fails, with two errors:
'AsyncDisplayKit/AsyncDisplayKit.h' file not found
Failed to import bridging header '/Users/Andrew/Desktop/testProject/testProject/testProject-Bridging-Header.h'
This is replicable. I seem to have followed their instructions perfectly well, and I haven't touched the project other than this.
Interestingly, it builds fine, and runs fine. But archiving, it gives these errors.
Any help is appreciated.
EDIT: If I import it using CocoaPods, it works just fine. The problem is that I'm specifically using Submodules, and not CocoaPods, for my project. It'd be pandemonium to switch to using both as a solution to this problem.