xcode - 如何使用第三方库: SWXMLHash in the playground ?

标签 xcode swift swift-playground swxmlhash

我正在使用 SWXMLHash 来解析项目中的 xml 文件,它在项目中运行良好,但我想在 Playground 上进行一些测试。

当我想在 Playground 上使用库时,我一直遇到错误:

Playground 执行失败:test.playground:5:8:错误:没有这样的模块“SWXMLHash” 导入 SWXMLHash ^

  • 我尝试删除派生数据文件夹中的文件。
  • 我尝试清理和构建,但似乎没有效果。

最佳答案

按照苹果文档中提供的步骤,我终于成功地使第 3 方库在 Playground 中工作:

https://developer.apple.com/library/ios/recipes/Playground_Help/Chapters/ImportFramework.html

我遵循了替代解决方案,现在我可以在我的 Playground 中使用第 3 方库。

感谢 SWXMLHash 的创建者 David Mohundro 提供的链接。

关于xcode - 如何使用第三方库: SWXMLHash in the playground ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36166238/

相关文章:

ios swift : Is it possible to change the font style of a certain word in a string?

swift - 在应用程序设置中更新导航栏颜色 - 不刷新或更新

swift - 无法在 Xcode Playgrounds 中创建文件夹?

ios - 尝试临时分发 ios 应用程序时出现 OSStatus 错误 100021

ios - 如何在 URLSession 数据任务中设置变量?

objective-c - 从xcode中的其他目录导入文件

ios - 如何使用多个按钮创建 segue 到 webView

Swift : Difference between sources and resources folders in playground file? 为什么 sources 文件夹有 swift 标志?

swift - Swift Playground 中的 CoreLocation

ios - 证书和 faSTLane 文件应该在 XCode 项目中提交给 git 吗?