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

使用Azure构建Unity iOS项目时XCode Build任务报配置文件错误求助

解决Azure DevOps中Unity iOS构建的UnityFramework配置文件错误

错误信息

error: UnityFramework does not support provisioning profiles. UnityFramework does not support provisioning profiles, but provisioning profile <<my profile name>> has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'UnityFramework' from project 'Unity-iPhone')

解决建议

  • 精准配置XCode Build任务
    在Azure DevOps的XCode Build任务中,仅为Unity-iPhone目标指定配置文件,不要给UnityFramework设置任何手动配置项。如果任务支持,在Arguments中添加-target Unity-iPhone,明确只构建主应用目标,避免脚本误修改UnityFramework的签名配置。

  • 从Unity导出阶段调整设置
    打开Unity编辑器的Player Settings -> iOS -> Other Settings,检查是否有强制给UnityFramework指定配置文件的选项,将其改为自动模式。导出XCode项目时,手动打开项目进入UnityFramework目标的Build Settings,把Provisioning Profile和Provisioning Profile Specifier都设为Automatic,保存后再提交到构建流水线。

  • 用构建前脚本批量修改配置
    在XCode Build任务前添加一个Bash任务,执行脚本修改XCode项目文件:

    # 清除UnityFramework的手动配置文件指定
    sed -i '' 's/PROVISIONING_PROFILE = ".*";/PROVISIONING_PROFILE = "";/g' Unity-iPhone.xcodeproj/project.pbxproj
    sed -i '' 's/PROVISIONING_PROFILE_SPECIFIER = ".*";/PROVISIONING_PROFILE_SPECIFIER = "";/g' Unity-iPhone.xcodeproj/project.pbxproj
    

    这段脚本会直接修改project.pbxproj文件,移除UnityFramework目标下的手动配置文件指定,让它自动使用默认设置。

  • 检查Azure签名资产配置
    确认Azure DevOps的Secure Files中上传的配置文件仅对应主应用目标,不要错误关联到UnityFramework。在XCode Build任务的Signing & Provisioning区域,选择手动签名时,只填写Unity-iPhone的配置信息,UnityFramework保持默认的自动签名逻辑。

内容的提问来源于stack exchange,提问作者Nguyễn Minh Chí

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.24 06:24:25