ios - Swift "Bridging-Header.h" file not allowing me to instantiate objective-c classes in .swift files -


when x-code tries create bridging header automatically, crashes every single time, followed instructions on how manually create bridging header. (create .h file, name <#project_name>-bridging-header.h, import .h files need?)

problem is, when try instantiate class in .swift file that's included in header, nothing happens (it says class doesn't exist) also, in bridging header doesn't seem autocomplete filenames when try include them, leading me believe somethings not linking properly.

has run this? know how fix it?

you need add target's build settings:

  1. in xcode, if go build settings target, , scroll way down you'll find "swift compiler - code generation" section.

  2. set "objective-c bridging header" <#project_name>-bridging-header.h

  3. i'm not sure of correct value "install objective-c compatibility header", it's yes/no, can toggle if doesn't work @ first.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -