How to silence Xcode 11.4 warnings about MobileCoreServices and AssetsLibrary?

For mute this warning:

  1. Open Pod target's Build Settings
  2. Select Build Options
  3. Add framework (e.g. AssetsLibrary) to Validate Workspace - Ignored Frameworks

enter image description here


I noticed that manually removing those two frameworks from Pods/Frameworks/iOS project navigator group resolves those warnings. Since both frameworks embedded into iOS itself (not app bundle) removing them doesn't have any effect at runtime. Here is how to do it automatically in Podfile post-install hook:

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

If this leaves a hanging (null) reference, you can do something like:

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