Unable to Command Click into CocoaPod libraries

已回答

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.

0
Avatar
Permanently deleted user
正式评论

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.

Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

Can you share a code snippet to illustrate the problem?

0
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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

请先登录再写评论。