After installed framework from pods, not able to import in class in Swift project

╄→尐↘猪︶ㄣ 提交于 2020-01-24 00:48:29

问题


I have installed some framework by pod file in my Xcode project. I am using Xcode 9.2. Its installed successfully, but, while trying to import that third party framework to my main class, showing no such module found.

Even tried so many times complete clean and rebuild. But, still showing the error No such module found OR Cannot load underlying module for XLPagerTabStrip.

In framework search paths it's showing like below PFA.


回答1:


if your facing No such module found XLPagerTabStrip. Do one thing Click on your app name on side of a select simulator for a run and click on manage scheme try to find XLPagerTabStrip. and checked it and close it .and then click on the app name where you can see XLPagerTabStrip. Then click on it then clean build project and again choose your app and then again clean and build. Your problem is solved !! See image Here where you have to click in the screenshot. you can find Demo




回答2:


Couple of things you can follow :

  1. Clean project + Remove derive data and build again.
  2. Check the Pods project on Xcode and make sure your pod exists in the Pod folder under Pod project.
  3. Add the Pod in Embedded Framework in project settings.
  4. Edit your scheme :
    Scheme menu > Manage Schemes > check Pods > Close
    Select Pods from the scheme menu.
    Build Pods.
    Select your project from the same menu, then build/run it.

  5. Reinstall Pod :
    pod deintegrate
    pod install

  6. Make sure you are correctly setting the pod in Pod file. Refer to original Github page of the library for the correct format.




回答3:


First clean your code right after pod installation is complete, build it once. Don't import pod files till now. After build is succeeded now you will be able to import pod files.



来源:https://stackoverflow.com/questions/48767081/after-installed-framework-from-pods-not-able-to-import-in-class-in-swift-projec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!