【问题标题】:RxSwift - Playground execution failed: Couldn't lookup symbolsRxSwift - Playground 执行失败:无法查找符号
【发布时间】:2019-01-09 10:04:16
【问题描述】:
我创建了一个新项目并使用 pod 来安装 RxSwift。然后我创建了一个游乐场并编写了以下代码:
import UIKit
import RxSwift
import PlaygroundSupport
var name = "hello"
let names = Variable(["Good"])
但控制台显示此错误:
游乐场执行失败:
错误:无法查找符号:__T07RxSwift8VariableCACyxGxcfC
__T07RxSwift8VariableCMa
【问题讨论】:
标签:
ios
swift
cocoapods
rx-swift
swift-playground
【解决方案1】:
试试这个Podfile:
platform :ios, '11.0'
target 'RxSwiftPlayground' do
use_frameworks!
# Pods for RxSwiftPlayground
pod 'RxSwift', '~> 4.0'
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings.delete('CODE_SIGNING_ALLOWED')
config.build_settings.delete('CODE_SIGNING_REQUIRED')
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CONFIGURATION_BUILD_DIR'] = '$PODS_CONFIGURATION_BUILD_DIR'
end
end
end
或者
- 删除“import RxSwift”行
- 清理(Cmd + Shift + K)
- 构建(有错误)
- 放回“import RxSwift”
来自https://github.com/ReactiveX/RxSwift/issues/1660