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

后端 未结 5 1526
执笔经年
执笔经年 2020-12-05 03:10

When X-code tries to create a bridging header automatically, it crashes every single time, so I followed the instructions on how to manually create a bridging header. (Creat

5条回答
  •  甜味超标
    2020-12-05 03:50

    1) create a file called "FMDB-Bridging-Header.h"

    inside this file type the following: #import "FMDB.h"

    3) go to Build Settings -> Swift Compiler - Code Generation - add to 'Objective-C Bridging Header': FMDB-Bridging-Header.h

    or if it was placed inside a folder in your project:

    FolderName/FMDB-Bridging-Header.h

提交回复
热议问题