首页 > 解决方案 > CocoaPods 找不到 pod“UMCore”的兼容版本

问题描述

错误报告

问题摘要

在按照通过更改 AppDelegate.h、AppDelegate.m 和 Podfile 来安装 unimodules 的步骤后运行 pod install 时出现错误。

环境 -expo diagnostics您定位的平台的输出

Expo CLI 4.0.13 environment info:
    System:
      OS: macOS 11.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.15.1 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.14.8 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.10.0 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
      Android SDK:
        API Levels: 26, 28, 29, 30
        Build Tools: 28.0.3, 29.0.2, 30.0.3
        System Images: android-28 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 4.0 AI-193.6911.18.40.6514223
      Xcode: 12.3/12C33 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.13.1 => 16.13.1 
      react-dom: ^16.13.0 => 16.13.0 
      react-native: 0.63.4 => 0.63.4 
    npmGlobalPackages:
      expo-cli: 4.0.13
    Expo Workflow: bare

可重现的演示

错误如下:

[!] CocoaPods could not find compatible versions for pod "UMCore":
  In Podfile:
    UMCore (from `../node_modules/@unimodules/core/ios`)

    UMPermissionsInterface (from `../node_modules/unimodules-permissions-interface/ios`) was resolved to 5.4.0, which depends on
      UMCore

Specs satisfying the `UMCore (from `../node_modules/@unimodules/core/ios`), UMCore` dependency were found, but they required a higher minimum deployment target.

重现步骤

  1. npm install --save react-native-unimodules
  2. 按照此处的步骤操作:https ://docs.expo.io/bare/installing-unimodules/
  3. pod 安装在 ios 目录中

预期行为与实际行为

预期的行为是 pod install 没有任何错误,但会收到 Reproducible Demo 部分中显示的错误。

标签: iosreact-nativeexpo

解决方案


出现此问题是因为库UMCorepod 文件的开发目标大于您项目的开发目标。要解决此问题,请查找 UMCore 库的 pod 文件并检查s.ios.deployment_target. 如果价值开发目标大于您的项目开发目标,则为您的项目开发目标设置相同的目标值。

要更改您的项目开发目标,请在 xcode 中打开项目。从 xcode 常规选项卡 > 部署信息。在这里你可以改变。


推荐阅读