问题
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 :
- Clean project + Remove derive data and build again.
- Check the Pods project on Xcode and make sure your pod exists in the Pod folder under Pod project.
- Add the Pod in Embedded Framework in project settings.
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.Reinstall Pod :
pod deintegrate
pod installMake 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