I'm trying to import a module called "NSObject+Rx" but Xcode complains with an obscure error (consecutive statements separated with ; etc).
import NSObject+Rx
Any idea how to import a module with special characters like this?
From Apple docs:
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 nonalphanumeric 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.
NOTE
You cannot override the product module name of a framework.
In your case, replace NSObject+Rx
with NSObject_Rx
or set your own name by changing the Product Module Name build setting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With