It gives errors when using Swift Static library with Objective-C project

前端 未结 5 1407
闹比i
闹比i 2020-12-13 18:44

I need to make swift static library for my requirement. I made swift static library which uses swift and Obj-c code. I have included Obj-c files via bridge file. I am able t

5条回答
  •  醉梦人生
    2020-12-13 19:28

    An update to Alex's answer:

    In my case it was a React-Native project after adding a Swift Pods library. Maybe just the step 2 can work:

    1. Adding a new Swift file and a Brigde header:

    1) File -> New -> File

    2) Select Swift File

    3) Confirm Create Bridging Header

    1. Go to Build Settings and set Always Embed Swift Standard Libraries to YES

提交回复
热议问题