CocoaPods 找不到 pod“UMCore”的兼容版本

时间:2021-01-20 04:30:19

标签: ios react-native expo

? 错误报告

问题摘要

按照以下步骤通过更改 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. 在ios目录下安装pod

预期行为与实际行为

预期的行为是 pod install 没有任何错误,而是得到可重现演示部分中显示的错误。

1 个答案:

答案 0 :(得分:0)

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

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