gpt4 book ai didi

ios - 使用未声明的类型 "SimplePing"

转载 作者:行者123 更新时间:2023-11-28 16:10:16 25 4
gpt4 key购买 nike

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

如何导入?

最佳答案

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

由于您的项目是用 Swift 编写的,而库是在 Objective C 中,因此您需要使用桥接 header 将库公开给您的 swift 类。

您可以在以下位置阅读更多相关信息:Objective C & Swift in Same Project

关于ios - 使用未声明的类型 "SimplePing",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39656796/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com