0

I accidentally clicked yes to the prompt about generating a Swift Bridging Header file. How do I stop my project creating the bridging header. I don't use Obj-C and if makes any difference I'm just using Swift 2.3

I have looked at my build settings too, but they seem to be blank.

I've followed the instructions of the duplicate but still getting a problem. I made a new project and even clicked "Don't create" bridging header. And did a test by adding a test attribute of type String, and it create .h and .m files.

enter image description here

Christophe
  • 68,716
  • 7
  • 72
  • 138
Jonnny
  • 4,939
  • 11
  • 63
  • 93
  • Possible duplicate of [How do I remove a bridge header without getting errors?](http://stackoverflow.com/questions/32274684/how-do-i-remove-a-bridge-header-without-getting-errors) –  Nov 05 '16 at 02:38
  • Once you follow the steps in the accepted answer of [this question](http://stackoverflow.com/questions/32274684/how-do-i-remove-a-bridge-header-without-getting-errors) you can then remove the bridging header file –  Nov 05 '16 at 02:40
  • What type of project did you create? Where did you put the test code? Can you post the test code (text, not an image)? When you added the test code did it create a file named like “Projectname-Bridging-Header.h”? –  Nov 05 '16 at 02:51
  • @ColGraff I used a git clone. I haven't updated this project in a while so it's not like it had this setting already installed. This comes up and gives me .h and .m files. I just made a brand new project and it was ok though. I made sure the build settings matched the new and the git clone and it again asked me to pick if I wanted the bridge file and I said "don't create" and it gave me .h and .m – Jonnny Nov 05 '16 at 02:56
  • So what type of project was the original? Could it possibly have been a Cocoa project to begin with? What type of project is the brand new one? –  Nov 05 '16 at 03:00
  • @ColGraff They're both single page ones. But I've built the new one to have multiple screens – Jonnny Nov 05 '16 at 03:01

1 Answers1

0

In my case I followed all the steps of the linked question, but it had also changed my code generation to Obj-C in my Identity & type inspector. Changing this back to Swift allowed the generated files to be of the correct type

Jonnny
  • 4,939
  • 11
  • 63
  • 93