Pick the fix
An Objective-C file can't see your Swift class Uploader. Fix?
Hint 1 of 1
Which header exposes Swift to Objective-C?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Make Uploader inherit from NSObject with @objc members, and import "MyApp-Swift.h" in the .m file
Correct. That exposes the class through the generated header.
Why not the others?
- B Add Uploader to the bridging header. The bridging header goes the other way, Objective-C into Swift.
- C Make Uploader a struct. Structs aren't visible to Objective-C.
- D Rename the file to Uploader.m. Swift code can't simply be renamed.