按照以下步骤通过更改 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.
预期的行为是 pod install 没有任何错误,而是得到可重现演示部分中显示的错误。
答案 0 :(得分:0)
出现此问题是因为库 UMCore
pod 文件的开发目标大于您项目的开发目标。要解决此问题,请查找 UMCore 库的 pod 文件并检查 s.ios.deployment_target
的值。如果价值发展目标大于您的项目发展目标,则为您的项目发展目标设置相同的目标值。
在xcode中更改您的项目开发目标打开项目。从 xcode 常规选项卡 > 部署信息。在这里你可以改变。