无法将Xamarin.Forms应用部署至实体iPad [PublicStaging]
Xamarin.iOS部署实体iPad报错:无法写入PublicStaging文件
错误信息
Writing content to file 'PublicStaging/com.productname'... Xamarin.iOS.Windows.HotRestartClient Error: 0 : Deploy Error: Could not write content to file 'PublicStaging/com.productname' 2>Deploy failed. The app 'ProductName.iOS.app' could not be deployed to the device 'Development iPad'. Please check the logs for more details.
已知情况
- 应用可正常部署至iOS模拟器,但部署实体iPad时触发上述错误
- 已尝试常规Hot Restart修复方案但无效
- 当前使用Visual Studio 17.3.2版本
- 因关联第三方产品限制,无法同时在模拟器部署两款产品
可行排查/修复方案
清理重建项目
右键iOS项目依次选择「清理」→「生成」,完成后重新尝试部署。检查设备目录权限
通过Xcode设备管理器连接iPad,找到PublicStaging目录,确认读写权限正常;若权限异常,手动删除该目录后重新部署。清空Hot Restart缓存
- 关闭Visual Studio
- 删除Windows端缓存:
C:\Users\<你的用户名>\AppData\Local\Xamarin\iOS\HotRestart - 删除Mac端缓存:
~/Library/Caches/Xamarin/iOS/HotRestart - 重启VS后重新部署
排查Bundle Identifier冲突
确认iPad上没有其他应用使用相同的Bundle Identifier(com.productname),若有冲突则修改项目的Bundle Identifier后重试。升级Visual Studio版本
17.3.2版本存在Hot Restart相关已知问题,建议升级至最新稳定版后再尝试部署。
内容的提问来源于stack exchange,提问作者Scott E
相关产品推荐
相关产品推荐

