首页 > 解决方案 > iOS 如何使用 Xcode 10.2 安装 Realm

问题描述

我尝试安装 RealmSwift,但出现此错误。

我使用 macMini 2012,所以无法更新到 macOS Big Sur

在这种情况下如何安装 RealmSwift?谢谢

[!] /bin/bash -c 
set -e
sh build.sh cocoapods-setup

Downloading dependency: sync 10.1.3 from https://static.realm.io/downloads/sync/realm-sync-xcframework-10.1.3.tar.xz
Undefined symbols for architecture x86_64:
  "___isPlatformVersionAtLeast", referenced from:
      realm::util::network::SecureTransportErrorCategory::message(int) const in librealm-sync-dbg.a(network_ssl.o)
      realm::util::network::ssl::Stream::verify_peer() in librealm-sync-dbg.a(network_ssl.o)
      realm::util::(anonymous namespace)::ensure_reclaimer_thread_runs() in librealm-sync-dbg.a(file_mapper.o)
      realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in librealm-sync-dbg.a(terminate.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

这是我的 Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

target 'Test' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Test
pod 'RealmSwift' 

end

标签: iosrealmxcode10.2

解决方案


推荐阅读