xcode - 如何消除有关 MobileCoreServices 和 AssetsLibrary 的 Xcode 11.4 警告?
问题描述
升级到Xcode 11.4 beta后,我从Pods
子项目(特别是来自YYImage
和Branch
目标)收到了这些警告:
目标完整性:MobileCoreServices 已重命名。请改用 CoreServices。
目标完整性:不推荐使用 AssetsLibrary。考虑改为迁移到照片。
我有inhibit_all_warnings!
我的Podfile
,但它对那些没有影响。
有没有办法让这些警告静音,直到这些 pod 的创建者修复它们?
解决方案
我注意到从Pods/Frameworks/iOS
项目导航组中手动删除这两个框架可以解决这些警告。由于两个框架都嵌入到 iOS 本身(不是应用程序包)中,因此删除它们在运行时没有任何影响。以下是如何在Podfile
安装后挂钩中自动执行此操作:
post_install do |installer|
installer.pods_project.frameworks_group["iOS"]["MobileCoreServices.framework"].remove_from_project
installer.pods_project.frameworks_group["iOS"]["AssetsLibrary.framework"].remove_from_project
end
如果这留下了悬挂(null)
参考,您可以执行以下操作:
post_install do |installer|
framework = installer.pods_project.frameworks_group["iOS"]["MobileCoreServices.framework"]
framework.referrers.each do |ref|
if ref.isa == "PBXBuildFile"
ref.remove_from_project
end
end
framework.remove_from_project
end
推荐阅读
- python - 在 python 中进行拼写检查的时间太多
- delphi - PostgreSQL 的 FireDAC 异常 EFDDBEngineException 错误代码映射是否有任何变化?
- c# - 如果 MSBuild 工具为时过早,如何让 MSBuild .proj 失败
- c++ - 使用 ICP 算法查找两个点云之间的平移
- angular - 如何在 angular-google-charts 中缩放谷歌折线图?
- javascript - 在 Google 我的地图 iframe 上禁用鼠标滚轮滚动
- r - R:使用 terminalExecute() 时出现“调用 capture_console_output 时出错:87”
- java - Centos java定制服务
- entity-framework - 实体框架:映射多对多
- mysql - 具有唯一子集的 MySQL 复合索引