我只安装Xcode 9并构建我的 native iOS项目。 (写得很快)
该项目在Xcode 8中正常,但是现在,我收到此错误:No viable overloaded '='
在文件中:Pods\Pods\Realm\object.cpp
第42行=> m_notifier = std::make_shared<_impl::ObjectNotifier>(m_row, m_realm);
最佳答案
如果您正在使用Cocoapods,请打开Podfile并将RealmSwift版本设置为2.8.1(或上述David提到的2.8.3)。这是我使用Xcode 9的Swift 3.0的Podfile:
target ‘<PROJECT>’ do
use_frameworks!
# Pods
...
pod 'RealmSwift', '2.8.1'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
然后,保存文件并运行:
如果您未设置特定的Pod版本(建议这样做),请运行以下命令:
它将自动更新到最新版本(2.8.3)。
希望它能帮助补充大卫的答案。谢谢!
关于c++ - Xcode9领域错误-没有可行的 ‘=’重载,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44448282/