When on mac:
Mac OS 10.12.6
Xcode 9.1 with default toolchain
When on linux:
If you have some swift code that exports properties or functions to objc using the @objc annotation, and those properties or functions reference types that automatically bridge to foundation object types like NSString/NSDictionary/etc, the code will compile on macOS successfully but will fail to compile on linux.
Some simple example code:
This compiles just fine on mac, but gives these errors/notes on linux:
The same thing happens for properties where the type is inferred to be something like String. This is problematic since I'd love to be able to run the same library on Linux that we run on iOS, in order to develop integration testing tools that verify that changes to the server do not negatively impact existing customers of our iOS apps. The code in question is compiled in swift 4 mode, which means we need to provide these annotations for the obj-c code in our codebase.