说我的Xcode项目有两个目标:foo-bar和foo-barTests
现在如果我想在foo-barTests中显示foo-bar中的标识符,那么如何导入?
解决方法
Naming Your Product Module
The name of the Xcode-generated header for Swift code,and the name of the Objective-C bridging header that Xcode creates for you,are generated from your product module name. By default,your product module name is the same as your product name. However,if your product name has any non-alphanumeric characters,such as a period (.),they are replaced with an underscore (_) in your product module name. If the name begins with a number,the first number is replaced with an underscore.
You can also provide a custom name for the product module name,and Xcode will use this when naming the bridging and generated headers. To do this,change the Product Module Name build setting.
所以import foo-bar变成import foo_bar.