Swift Bridging Header and visibility of Obj-C class

Follow these steps:

  1. Create a Swift project
  2. Add a test class as Cocoa Class instead of .m and .h separately. Xcode prompt add bridging header.
  3. Import test class header in bridging header, which you already did. Should have no issue instantiate test class in Swift.
  4. Copy BL_KeyChainWrapper .m and .h to project directory in finder.
  5. Drag BL_KeyChainWrapper files to project and make sure Add to Targets.
  6. Import BL_KeyChainWrapper header in bridging header.
  7. Instantiate BL_KeyChainWrapper class in Swift.

If followed the above steps, and still have the error. It is probably that you didn't declare a class named BL_KeyChainWrapper in BL_KeyChainWrapper.h. Make sure in your BL_KeyChainWrapper.h, you have code like following:

@interface BL_KeyChainWrapper : BaseClass