Swift bridging header file won't work with use_frameworks

前端 未结 6 2199
春和景丽
春和景丽 2020-12-30 01:51

I\'m trying to use GoogleidentityToolkit library to handle login an things. I enable use_frameworks! on my pod file, but the module GITkit can\'t be found. I\'m trying to fi

6条回答
  •  醉话见心
    2020-12-30 02:15

    A) Create a Bridging Header file named "ProjectName-Bridging-Header.h" in the root folder of your project.

    B) Go to the project build settings and set the following values:

    • "Install objective-c compatibility header" : YES
    • "Objective-C Bridging Header" : path of your bridging header (e.g. "ProjectName/ProjectName-Bridging-Header.h"

    After that you can use the header file to import all your ObjectiveC files which you want use within swift code.

    NOTE: if required set the path as a recursive both in the resource headers and the Swift compiler search section.

提交回复
热议问题