【问题标题】:Playground execution failed: error: Couldn't lookup symbolsPlayground 执行失败:错误:无法查找符号
【发布时间】:2016-04-17 04:57:30
【问题描述】:

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

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

如何解决这个问题?

【问题讨论】:

  • 我似乎在使用 CocoaPods 和 Carthage 时都遇到过这种情况。它似乎与您的框架有关,包括依赖项。删除这些依赖项,它工作正常,但显然这不是一个解决方案。

标签: ios swift swift-playground


【解决方案1】:

如果您的图书馆有.podspec,您可以使用cocoapods-playgrounds 生成一个应该可以工作的游乐场。

$ 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 方案,然后就可以开始了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-22
    • 1970-01-01
    • 1970-01-01
    • 2015-10-03
    • 1970-01-01
    相关资源
    最近更新 更多