You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行pod install报错:无法确定AdewoleFarmApp目标的平台

解决Cocoapods安装Amplify时「无法确定目标平台」的错误

出现[!] Unable to determine the platform for the 'AdewoleFarmApp' target错误的核心原因是Podfile未明确指定项目的平台版本——默认的平台配置行被注释掉了。

解决步骤:

  1. 打开你的Podfile,取消第一行# platform :ios, '9.0'的注释,根据项目实际需求修改iOS版本号(Amplify Swift目前要求最低iOS 13.0,建议设置为platform :ios, '13.0')
  2. 修改后的Podfile示例:
# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'

target 'AdewoleFarmApp' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for AdewoleFarmApp
    pod 'Amplify'
    pod 'AmplifyPlugins/AWSCognitoAuthPlugin'
    pod 'AWSPredictionsPlugin'
    pod 'CoreMLPredictionsPlugin'

end
  1. 保存Podfile后,重新执行pod install命令

额外排查点:

若问题仍存在,确认Xcode项目的Deployment Target版本与Podfile中指定的平台版本一致,版本不匹配也可能触发同类错误。

内容的提问来源于stack exchange,提问作者Wilson Agene

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 13:45:30