Internal Swift class accessible to another framework?

Hi Swift folks,
I tried to make an internal Swift class in my binary framework accessible to another binary framework (such as private header in ObjC framework). However I couldn't find a way.

Defining a submodule -> XCFramework doesn't support Submodule

mark the Swift class as @objc, define a separate .h file, and use it as private header -> In the framework that I intend to use that class, there's an error of body function not found

Please help! Thanks!

The purpose of internal is to ensure that you can't find a way. Otherwise, it wouldn't be internal, and there would be a bug. As I'm sure you know, you can use a testable import to access internal members for testing purposes.

2 Likes
Terms of Service

Privacy Policy

Cookie Policy