在Swift中找不到源文件 [英] Source files not found in Swift

查看:71
本文介绍了在Swift中找不到源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个Cocoapod。我按照他们网站上列出的步骤进行操作;但是,由于我正在尝试创建示例应用程序,因此遇到了问题。它会查找并自动完成该模块,但是对于我在类中定义的所有内容,它都会显示 Undefined Type:

I am trying to create a Cocoapod. I used the steps listed on their website to do so; however, now that I am trying to create the sample app I'm running into issues. It finds and auto completes the Module, however it says "Undefined Type" for anything I have defined in Classes:

Podfile:

Podspec:

尝试使用吊舱的类:

,该协议包含在正确的项目中

不确定发生了什么,但是当我命令+单击图像3中突出显示的协议,它确实将我链接到吊舱中的正确文件

Not sure what is going on but when I Command+Click on the highlighted protocols in image 3 it does link me to the correct files in the pod

推荐答案

尝试将您的协议声明为公共协议,因为您的广告连播位于其他模块中,并且默认访问权限是内部访问。

Try declaring your protocol as public, since your pod exists in a different module, and the default access permission is internal.

这篇关于在Swift中找不到源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆