Swift import statement failing

后端 未结 3 1948
抹茶落季
抹茶落季 2021-02-11 05:15

UPDATED with answer at bottom

I am using the TwitterKit framework as installed with Twitter\'s new Fabric platform. This code in ViewController.sw

相关标签:
3条回答
  • 2021-02-11 05:40

    I had a same error with Xcode 7

    Helped to uncheck and then check again a checkbox field standing for linking the broken framework in the target membership section

    0 讨论(0)
  • 2021-02-11 05:46

    Here I have tried to add this framework in application and its perfectly working. From this it is clear that issue is related to linking with the module you have added.

    Relink / Reference again with the module will resolve this issue:

    Points need to be highlight:

    1. Copy the framework to project application folder.

    For example:

    Go to finder of its location >> From Xcode right click on project name >> Show in finder will open project location folder. Here you must have to copy TwitterKit.framework bundle.

    enter image description here

    1. Again right click on the project name and click on Add files to "project-name" >> Select TwitterKit.framework bundle and click on Add button will add a reference of that framework to project.
    0 讨论(0)
  • 2021-02-11 05:53

    I was facing the same problem. My project was swift based and there were no objective C code. I wanted to add 3rd party framework and on import facing same error "no such module". I solved it by adding a bridging-header file in swift and just import framework there. It works for me.

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