ios - 带有 Realm for WatchOS 的架构 i386 的 undefined symbol

标签 ios swift cocoapods realm watchos-2

我想在我当前的 Projekt 中添加一个 AppleWatch-Extension。 我正在使用这个播客文件:

def shared_pods
    pod 'RealmSwift', '2.0.2'
end

target 'Target-iOS' do
  platform :ios, '9.0'
  use_frameworks!
  ...
  shared_pods
end

target 'Target-MensaWidget' do
  platform :ios, '9.0'
  use_frameworks!
  shared_pods
end

target 'Watch Extension' do
  platform :watchos, '2.0'
  use_frameworks!
  shared_pods
end

pod install 之后,我将在我的控制台中收到此警告:

[!] [Xcodeproj] Generated duplicate UUIDs:

当我尝试构建项目时出现此错误:

Undefined symbols for architecture i386:
  "realm::BpTreeBase::replace_root(std::__1::unique_ptr<realm::Array, std::__1::default_delete<realm::Array> >)", referenced from:

我还尝试在 Watch-Target 中使用 $(inherited)。

我正在使用 Xcode 7.3.1 和 pod 版本 0.39.0

有什么想法吗?

最佳答案

我在 Realm 上遇到了同样的错误。 我通过清理 cocoapods 缓存摆脱了错误“Undefined symbols for architecture i386”:

pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
pod deintegrate
pod setup
pod install

关于ios - 带有 Realm for WatchOS 的架构 i386 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40339729/

相关文章:

ios - Restkit 映射时添加自定义值

ios - 无法从 iOS 中的 BLE 设备获取数据/服务

ios - 尝试使用警报完成刷新 Collection View

ios - 关于多平台库的基本 Swift 包管理器问题

ios - iOS 中的 Swift : Resizing UIImage for Portrait or Landscape

ios - 如何使用 AVFoundation 在 Objective-C 中创建动态图

ios - 从私有(private) pod 的 Assets 目录中加载图像

ios - Cocoapods安装错误

ios - 如何为依赖于使用 cocoapods 添加的其他框架的所有体系结构构建 cocoa touch 框架?

ios - 如何正确更改 View Controller 层次结构?