I have a Cocoa Touch Framework written in Swift that I wish to distribute as a CocoaPod.
The idea is that this will be a closed-source distribution since only the public headers are exposed.
In my podspec I have set the source as the github repo containing my framework. I have also added:
s.public_header_files = "mylibrary.framework/Headers/*.h"
s.preserve_paths = "mylibrary.framework"
s.vendored_frameworks = "mylibrary.framework"
The reason I was getting "Use of unresolved identifier" errors when I was trying to use my public classes is because my header file
mylibrary-Swift.h was not getting exposed properly.
I was able to fix this issue by naming my header file explicitly in my podspec like this:
s.public_header_files = "mylibrary.framework/Headers/mylibary-Swift.h"
After I pushed this new podspec I am able to use my public classes and methods.