简体   繁体   中英

Building own framework - cannot expose swift to objective-c

I try to build a mixed swift and obj-c framework. I have a swift class, ClassA and obj-c class ClassB . Inside ClassB I have #import "ProjectName/ProjectName-Swift.h"

But the problem is that classB doesn't compile because it cannot recognise swift methods. And in the same time there is no complains to "ProjectName/ProjectName-Swift.h" - it imports just fine.

What am I doing wrong ?

解决方案-Swift类和所有方法都必须标记为public

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM