Swift Framework: Umbrella header '[…].h' not found

后端 未结 22 2222
盖世英雄少女心
盖世英雄少女心 2020-12-07 11:49

In a custom framework containing both Objective-C and Swift code, the Swift compiler throws the following error:

[build_pat         


        
22条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 12:19

    For me - access level was public but it also fails on umbrella not found. I did move the "Headers" section of the "Build phases" to the top and it started to work. Script to podfile:

    post_install do |installer|
    installer.pods_project.targets.each do |target|
        phase_name = 'Headers'
        target.build_phases.each do |phase|
            if (phase.display_name.include? phase_name)
                target.build_phases.unshift(phase).uniq! unless target.build_phases.first == phase
            end
        end
    end
    

    Have no clue why it is happening. Tried on dummy projects - not happening. Only on big ones with multiple dependencies. Something with compiling BEFORE copying umbrella headers.

提交回复
热议问题