CocoaPod installed but doesn't see Swift code

邮差的信 提交于 2019-12-11 05:06:31

问题


I've been struggling with integrating an ImagePicker library into my project. CocoaPods website shows this pod correctly except for the documentation even though it's documented, guess it simply doesn't see the code...

Steps to recreate my issue:

Install a pod through CocoaPods.

platform :ios, '9.0'
target 'TestProject' do
  use_frameworks!
pod 'ImagePickerKit', '~> 0.2'
end

Import ImagePickerKit module and try to implement some protocol...

What can be wrong?

Thank you in advance.

P.S. Xcode doesn't complain about not conforming to a protocol, it simply doesn't know anything about this protocol ("Use of undeclared type ...").


回答1:


Try to run the app, sometime after you install the pod you have to run it in order to make the compiler recognize the new pod.




回答2:


Okay, the library was updated and integration finally went well. The problem occurred because the previous versions of this library were using internal access modifiers which CocoaPods didn't see or just ignored.




回答3:


You did eveything correctly, Apple shows you that it's wrong because you didn't yet use Cropable, so once you will have write some code using it, the error will disappear :)



来源:https://stackoverflow.com/questions/38472800/cocoapod-installed-but-doesnt-see-swift-code

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