天天看點

swift建立橋接檔案_橋接頭檔案Swift

swift建立橋接檔案_橋接頭檔案Swift

I want to manually create a Obj-C bridging header file for my new Swift project for use with AudioKit. I am stuck. Everything seems to be correct (I even checked whether a space at the end of the file path was the problem and it isn't, and I cleared the project). As a proof I include a screenshot:

swift建立橋接檔案_橋接頭檔案Swift

What could be wrong?

解決方案

The name of the bridging header should be of the format

-Bridging-Header.h

So if your target name is AudioMeter. Then the name of the bridging header should be

AudioMeter-Bridging-Header.h

Also make sure the path of the bridging header is specified in Xcode Build Settings under Objective-C Bridging Header option.