I found a Objective-C Bridging Header
setting in the target Build Settings. It was hidden by default. Check All instead of Basic.
In recent Xcode versions this solution would give the error Using bridging headers with framework targets is unsupported
.
The workaround I've been using is to make the C-header public in the file inspector and import it in MyFramework.h
like this example:
#import <MyFramework/MyObjectiveC.h>
How to change the C-header to public
Open your C-header and view the inspector by clicking in the upper right corner. To view the file inspector, click the file icon in the upper right corner.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…