Unable to Command Click into CocoaPod libraries

Answered

I have an iOS app I am working on and I have several CocoPod libraries. I am unable to command click to go to the definition of any classes or functions in any of the libraries. Also code completion does not work for these libraries. It works in Xocde though. I don't know if something is not configured correctly or what.

5 comments
Official comment

Hi,

You may want to try File | Invalidate Caches & Restart. If that doesn't help, please specify which CocoaPod libraries are you using and where do you use them (in Objective-C or Swift)? It would be great if you could share contents of your Podfile.

That didn't help. I still get "Cannot find declaration to go to" when command clicking. The pod I am using is SnapKit https://github.com/SnapKit/SnapKit This is in swift.

0

Can you share a code snippet to illustrate the problem?

0

Just a simple call in SnapKit.

self.yearOneRow.view.snp.makeConstraints { (make) in
make.top.equalToSuperview().offset(standardOffset)
make.left.equalTo(group.contentView.snp.left).offset(standardOffset)
make.right.equalTo(group.contentView.snp.right).offset(-standardOffset)
}
0

Can you provide a self-sufficient snippet where all declarations involved are known? It's essential to know the types of 'yearOneRow', 'group' and other variables/properties in order to investigate.

0

Please sign in to leave a comment.