Xcode 8 with mixed Swift and Objective-c project generated “ModuleName-Swift.h” header not found

后端 未结 5 1556
醉话见心
醉话见心 2020-12-08 07:36

I have a project with mixed Swift and Objective-C in Xcode 8 that uses the generated \"ModuleName-Swift.h\" header file to import swift into Objective-c classes, but the pre

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 08:25

    You need to add this in your build settings.

    There might be an issue while migrating to Xcode 8, where you will have unspecified in the build setting Swift header file.

    This if from killerz

    Go to Build Settings->Objective-C Generated Interface Header Name and set the value to YourModule-Swift.h (this is usually already set, this is the filename you need to import on .m file #import "YourModule-Swift.h"

提交回复
热议问题