As described in the title, the Build Rules work fine and the .h/.m files gets generated.
I can import them in both Obj-C/Swift files (thanks to Bridging Header) and use them.
The problem comes when the build shall be clean, or a file has to be re-added (if there was a compile error). In that case, if the bridging header is importing the missing file, AND there is at least a Swift file, I can no more compile because Xcode apparently. In my example project, only workaround I found is, comment everything from the Swift files that references to transpiled classes, comment in Bridging Header the import of missing files, compile, and undo the changes.
Clearly this is utterly unconfortable. This problem is even reproducible in J2Reversi project.
Just add one Swift file. Xcode will ask you to create a bridging header file, say yes.
Now **clean** the project and import any transpiled (still to transpile) file, for example Move.h.
Now Xcode will complain and give error of file not found, and failed to import bridging header.
Is there a way to execute the build rule script before actually compiling Swift files?
I'd like to use Swift because it's much more clean than Objective-C and Swift 3 has pretty clean names in functions too, even if they're not mapped.
--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.