I have a project with Swift and Objective-C code. In my current project I have the problem that the #import "Project-Swift.h"
file does not refresh if I add new Swift modules.
#import "Project-Swift.h" // does not refresh if I add .swift files
So in the Objective-C universe, the swift code is not available. the files exists, but does only contains default #defines
etc. No project related stuff.
Clear Cache, rebuild, delete Derived Data does not help.
Solved it. Forgot @objc(<class>)
. It is mandatory.
Details here (Migrating)
Migrating Objective-C Code to Swift
And here (Swift Type Compatibility)
Interacting with Objective-C APIs
In my case it worked by building for the other target I had on my project:
@objc
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