I came across this question having the same problem, but I had a completely different solution that worked right away.
For some reason, sometimes a project seems to lose control over some of the settings that apply to CocoaPods. In my case, this was caused when I downloaded a project from a repository that was configured by someone else - even running the “install packages” again did not remove the compilation error.
I finally came across a solution, the project should use the Pods configuration files for your purpose. Go to the "Information" tab on the project settings page, open the "Configurations" section. Expand both the Debug and Release options, make sure that the configuration of the containers is configured in your project. If not, click on the drop-down list and select "pods" for Debug and Release - now compile and the error should go away.
Here is an image showing exactly which part of the Xcode configuration I am talking about.

Kendall helmstetter gelner
source share