Getting error “No such module” using Xcode, but the framework is there

前端 未结 30 1889
小蘑菇
小蘑菇 2020-11-22 05:02

I\'m currently coding in Swift, and I\'ve got an error:

No such module Social

But I don\'t understand, because the module is in

30条回答
  •  鱼传尺愫
    2020-11-22 05:51

    TL;DR: Check your Podfile for target-specific shared_pods

    After beating my head against the wall and trying literally every single other answer posted here over the last week, I finally found a solution.

    I have two separate targets - one for release and one for development. The development target was created long after the release target, which lead me to forget some setup steps for that target.

    I was able to get my project to compile properly using my release target, but my development target was having an issue.

    After looking at my Podfile for the twentieth time, I noticed that I only had the following, under my shared_pods definition:

    target 'Release' do
      shared_pods
    end
    

    What I needed to do was add my second target to my Podfile, and that fixed the issue:

    target 'Release' do
      shared_pods
    end
    
    target 'Development' do
        shared_pods
    end
    

    Hopefully this saves someone a few days of frustration.

提交回复
热议问题