XCode keeps forgetting imported Frameworks

前端 未结 2 1832
醉酒成梦
醉酒成梦 2021-01-13 00:42

I have Xcode 6.3, using Swift, importing a Parse 1.7.1 Framework as usual (dragging, copying) and I set it up in a group: Frameworks.

I compile and everything works

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-13 01:09

    I just fixed this same issue today with my project. I imported my obj-c framework in a swift project and it worked for a while, then xcode seemed to forget it causing the same error you have.

    apple docs

    I fixed it by referencing the bridging header in Build Settings.

    Under Build Settings, make sure the Objective-C Bridging Header build setting under Swift Compiler - Code Generation has a path to the header. The path should be relative to your project, similar to the way your Info.plist path is specified in Build Settings. In most cases, you should not need to modify this setting.

    I just typed in the name of the bridging header folderName/xxxx-BridgingHeader.h in the field that states bridging header and all was well again.

提交回复
热议问题