Objective C to Swift header file with multiple targets

前端 未结 6 1688
無奈伤痛
無奈伤痛 2020-12-01 03:32

I\'m successfully calling my Swift classes from Objective C (for target \'MyApp\') via the import statement:

#import \"MyApp-Swift.h\"

I\'v

6条回答
  •  难免孤独
    2020-12-01 03:54

    Well, the only way I can fix is to...

    #ifdef IS_LITE
    #import "MyApp_Lite-Swift.h"
    #else
    #import "MyApp-Swift.h"
    #endif
    

    Note that if there's any 'illegal' chars in my Product Module Name, they need to be replaced with underscores.

    Hope that helps!

提交回复
热议问题