ios - Playground 执行失败 : error: Couldn't lookup symbols

标签 ios swift swift-playground

我正在使用 Xcode 7.3。我已经将 Playground 和 Frameworks 放在同一个工作区中并构建了框架。我仍然收到此错误

Playground execution failed: error: Couldn't lookup symbols:  
_RestofireVersionNumber

Playground execution failed: error: Couldn't lookup symbols

如何解决?

最佳答案

如果您的库有 .podspec,您可以使用 cocoapods-playgrounds生成一个应该可以工作的 Playground 。

$ gem install cocoapods-playgrounds
$ pod playgrounds Restofire.podspec

看起来该插件也对 Carthage 项目提供了初步支持。

该插件会在您的项目文件夹中创建一个新文件夹,其结构如下:

RestofirePlayground
├── Podfile
├── Podfile.lock
├── Pods
│   ├── Alamofire
│   ├── Headers
│   ├── Local\ Podspecs
│   │   └── Restofire.podspec.json
│   ├── Manifest.lock
│   ├── Pods.xcodeproj
│   └── Target\ Support\ Files
│       ├── Alamofire
│       ├── Pods-TidalPlayground
│       └── Restofire
├── Restofire.playground
├── Restofire.xcodeproj
└── Restofire.xcworkspace

生成 Playground 后剩下的就是构建 RestofirePlayground 方案,然后就可以开始了。

关于ios - Playground 执行失败 : error: Couldn't lookup symbols,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36672834/

相关文章:

ios - 取下耳机时防止视频暂停

json - 我如何修复 "Error Domain=NSCocoaErrorDomain Code=3840 "无值 ."UserInfo={NSDebugDescription=No value.}"

arrays - 简单的 Swift 数组扩展

macos - CIColorClamp 在 OS X El Capitan 中无法正常工作

ios - iOS Playground 中的 NSUserDefaults

swift - 使用 Xcode Playground 的 Swift 代码中的 EXC_I386_GPFLT

ios - NSError 返回 self

ios - 奇怪的 UITableView 错误

iphone - iOS 中的 “Property implementation must have its declaration in interface” 错误

ios - Xcode/Objective-C - 通过prepareForSegue传递数据