c++ - Xcode9 领域错误 - 没有可行的重载 ‘=’

标签 c++ ios xcode

我只是安装了 Xcode 9 并构建了我的原生 iOS 项目。 (用swift写)

该项目在 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 install

如果您没有设置特定的 pod 版本(我推荐),请运行以下命令:

pod update RealmSwift

它会自动更新到最新版本 (2.8.3)。

希望它有助于补充大卫的回答。谢谢!

关于c++ - Xcode9 领域错误 - 没有可行的重载 ‘=’,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44448282/

相关文章:

c++ - 如何在函数内部声明全局变量?

c++ - 将回声效果添加到 .wav 文件

ios - 修改 iOS Cordova/PhoneGap 应用程序上的用户代理字符串

iOS 在 App Store 更新中减少了二进制文件的大小

ios - 如何使用 swift 在 JTCalender 中自动滚动到下个月?

c++ - timeGetTime 是衡量游戏循环时间的好方法吗?

ios - "Could not find Developer Disk Image"运行错误

ios - bool 扩展数组

ios - iPhone X 中的背景图像拉伸(stretch)

c++ - 我如何使用他的 HWND 检查窗口是否有可见的滚动条?