我正在尝试举办建筑博览会,但由于 Cocoapods 过时,一直遇到错误。
[!] `RNFBApp` requires CocoaPods version `>= 1.10.2`, which is not satisfied by your current version, `1.10.1`.
Error: Your project requires a newer version of CocoaPods, you can update it in the build profile in eas.json by either:
- changing the current version under key "cocoapods"
- switching to an image that supports that version under key "image"
我尝试按照说明使用我想要的版本更新我的eas文件,但它似乎被简单地忽略了:/
{
"cli": {
"version": ">= 0.38.1"
},
"build": {
"development": {
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleDebug"
},
"ios": {
"buildConfiguration": "Debug",
"cocoapods": "1.11.2"
}
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
有人知道如何解决这个问题吗?我的构建在本地运行良好,并且可以在模拟器上加载,无需担心。
既然我已经解决了这个问题,我将分享我的故事:
我在 Windows 上运行以下命令:
eas build --profile release --platform ios
这是我的eas.json的相关部分:
{
"build": {
"release": {
"android": {
"buildType": "app-bundle",
"gradleCommand": ":app:bundleRelease"
},
"ios": {
"cocoapods": "1.11.2"
}
}
}
}
将 cocoapods 密钥添加到 eas.json 解决了我的问题。
我遇到了同样的问题,你所要做的就是用它替换你的代码,一切都会正常工作。
{
"cli": {
"version": ">= 0.38.3"
},
"build": {
"development": {
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleDebug"
},
"ios": {
"buildConfiguration": "Debug",
"cocoapods": "1.11.2"
}
},
"preview": {
"distribution": "internal"
},
"production": {
"ios": {
"cocoapods": "1.11.2"
}
}
},
"submit": {
"production": {}
}
}
您需要将此代码添加到 build 内的 product
"ios": {
"cocoapods": "1.11.2"
}
我现在也遇到同样的问题,你能帮我吗?