使用未声明类型“SimplePing”

时间:2016-09-23 09:01:54

标签: ios swift

我想在我的快速项目中使用SimplePing。当我尝试这样做时(受到example的第二个快速回答的启发),我收到了此错误Use of undeclared type "SimplePing"Use of undeclared type "SimplePingDelegate"。我没有为SimplePing找到一个pod,默认情况下它在iOS中不存在。

如何导入它?

1 个答案:

答案 0 :(得分:1)

SimplePing不是内置库,现在没有可用的pod。如果您想使用该库,请继续从Apple下载SimplePing.hSimplePing.m,然后将其拖放到您的项目中。

由于您的项目是用Swift编写的,并且库位于Objective C,因此您需要使用桥接头将库公开给您的swift类。

您可以在Objective C & Swift in Same Project

上详细了解相关信息
相关问题