It is also possible to set the Product Module Name setting in Build Settings to be the same across your modules (I set it to $(PROJECT_NAME)), so that the <project>-Swift.h file that is generated has the same name across all modules. This eliminates the need for adding/checking preprocessor macros.
The best way I've found to address this issue is in your Xcode shared project settings. You can search for the following setting:
Objective-C Generated Interface Header Name*
If you set that value to a common header name, such as "MyProject-Swift.h", it will be applied to each of your targets and you can safely use the import declaration in any of your Objective-C files. This allows you to continue using unique product module names for each target, if needed.
I've tested this in Xcode Version 6.4 (6E35b).
*Note: This will appear under your Swift compiler settings, which are only visible if you have Swift source files added to your project. Additionally, if a target doesn't have any Swift source associated with it, the Swift compiler options will not be visible for that target's build settings.
Previous answers have some problems if you decide to rename your targets or project, or use SWIFT_MODULE_NAME as intended.
The most universal solution is to change SWIFT_OBJC_INTERFACE_HEADER_NAME (“Objective-C Generated Interface Header Name”) under Project's, not Targets, Build Settings, to:
$(PROJECT_NAME)-Swift.h — one per project;
$(SWIFT_MODULE_NAME)-Swift.h — one per module (default value).
1- from first target (which has a working bridging) Build Setting select Objective C Bridging Header
2- Copy Objective C Bridging Header
3- open the other target Build Setting
4- Paste it
5- change the header file to your new header file (i.e target B.h)
select first target tap build setting -> find Objective-C Bridging Header set xxx-bridging-Header.h and Objective-C Generated Interface Header Name set xxx-Swift.h