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

前端 未结 30 1807
小蘑菇
小蘑菇 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:31

    In Xcode 10.1 the solution for me was to change the build system on Workspace Settings in the File menu. It is by default set to New Build System, changed that to Legacy Build System and that did the trick.

    0 讨论(0)
  • 2020-11-22 05:32

    I'm not sure why this happens, but one way to solve your issue is to go into your build settings and defining the Framework Search Paths to a folder which contains the frameworks in question. If the frameworks are placed in your project directory, simply set the framework search path to $(SRCROOT) and set it to recursive.

    0 讨论(0)
  • 2020-11-22 05:33

    In my case the app the IPHONEOS_DEPLOYMENT_TARGET was set to 9.3 whereas in my newly created framework it was set to 10.2

    The implicit dependencies resolver ignored my new framework because the requirements of the target platform are higher than the app requirements.

    After adjusting the framework iOS Deployment Target to match my application deployment target the framework compiled and linked successfully.

    0 讨论(0)
  • 2020-11-22 05:33

    I just deleted my cocoapod. Then, I did a pod install to remove it. Then, I just added it back into my podfile and re-installed it. That made it work. Not sure why.

    0 讨论(0)
  • 2020-11-22 05:33

    For me Build Active Architecture Only was set to Yes for the selected configuration. This did the trick:

    Select "Pods" from the left project navigator > Select "Build Settings" > Build Active Architecture Only to No

    0 讨论(0)
  • 2020-11-22 05:34

    I fixed this with

    Targets -> General -> Linked frameworks and libraries

    Add the framework which should be at the top in the Workspace folder. Pain in the arse.

    0 讨论(0)
提交回复
热议问题