No such Module Error

前端 未结 2 1735
长情又很酷
长情又很酷 2020-12-18 16:20

I am working on a chat app using Swift, and cocoa pods and I keep getting this issue. It says no such module JSQMessagesViewController, and the pod file is set up just like

相关标签:
2条回答
  • 2020-12-18 17:01

    Do the following things and you can import any swift file from "Pods"

    1) Clean your project

    2) Make sure that all your "Pods" > "Build Settings" > "Build Active Architecture Only" is set to "NO".

    3) Don't run, just build your project.

    4) Now, import any file from "Pods" to any swift file

    E.g.: import JSQMessagesViewController

    5) Again, build project and it will work as expected. Finally, you can access it properties

    Hope this helps!

    0 讨论(0)
  • 2020-12-18 17:25

    Once you installed your Pods, close xCode. Then open it back using the following command line:

    $ open App.xcworkspace

    I had the same issue than you and it worked for me. Took this info from https://cocoapods.org/.

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