ayinala
ayinala

Reputation: 195

Issue in using swift files into my objC project

I've to use some .swift file into my objctiveC project.when I'm trying to add the swift files into bundle, the productodule-swift.h file not getting generated instead its generating bridging header file.I've changed my project settings DEFINES_MODULE to YES and PRODUCT_MODULE to myprojectnameModule...but no use...is there anything I'm doing wrong.please suggest me...thanks in advance

Upvotes: 1

Views: 149

Answers (1)

ayinala
ayinala

Reputation: 195

  1. MyProductName-Bridging-header.h,MyProductName-Swift.h both are generated when importing a .swift file for the first time.

  2. MyProductName-Swift.h file is not visible but exists in project.Never Delete MyProductName-bridging-header.h file

  3. Settings DEFINES_MODULE should be YES and PRODUCT_MODULE should be MyProductName.

  4. Add # import "MyProductName-Swift.h" in your objective-c class.

Upvotes: 1

Related Questions