Failed to emit precompiled header for bridging header

后端 未结 20 1481
傲寒
傲寒 2020-11-30 04:35

I downloaded a project from GitHub, then pod the following files, some of which are written by OBJ-C and I used a bridge header.

pod ‘SnapKit’
pod ‘MJRefresh         


        
20条回答
  •  醉梦人生
    2020-11-30 05:09

    I had this issue just when compiling for a simulator not for a hardware device. There were two compile error like:

    • error: failed to emit precompiled header 'Bridging-Header-97bd5f.pch' for bridging header 'Bridging-Header.h'
    • Could not find ActionSheetPicker_3_0/ActionSheetPicker.h in Bridging Header (but it was declared there)

    After hours of research and try and errors it turned out, that there was no valid architecture set in the project to compile for simulators.

    At Project -> Build Settings -> User-Defined -> VALID_ARCHS add the architecture x86_64 to enable compilation for simulators.

提交回复
热议问题