Reputation: 547
I have followed all instructions to install an Objective-C pod into my Swift project. I made a bridging header that IS being found upon build, but I cannot access any of classes. The bridging header path is relative to srcroot so I am not worried about the file being found.
I imported my pod in the bridging header like so:
#import <ASCFlatUIColor/ASCFlatUIColor.h>
I have already looked here: How to call Objective C code from Swift, but I am still getting errors from:
self.view.backgroundColor = ASCFlatUIColor.emeraldColor()
I have no errors in the pod, but my project simply is not capable of finding the pod's files:
Use of unresolved identifier 'ASCFlatUIColor'
Do I have to add any user header search paths?
Any help?
Upvotes: 2
Views: 1253
Reputation: 547
Alright so I found the fix. Make sure to link the framework in "Link Binary with Libraries":
After you do that, you can add an import statement:
import ASCFlatUIColor
And then you have access to:
self.view.backgroundColor = ASCFlatUIColor.emeraldColor()
Hope this helps someone else!
Upvotes: 3