美文网首页
Xcode - 解决Cocoapods提示IPHONEOS_DE

Xcode - 解决Cocoapods提示IPHONEOS_DE

作者: NFatalist | 来源:发表于2021-03-18 09:18 被阅读0次

    解决Cocoapods提示IPHONEOS_DEPLOYMENT_TARGET低于最低支持版本问题

    近期好几个项目提示IPHONEOS_DEPLOYMENT_TARGET设置为8.0,但是支持的target version是在9.0-14.4.99之间, 虽然不会影响项目开发,但是许多三方库会显示警告。如下图:


    clip-20210308141748.png

    解决方案

    在Podfile文件最下方添加以下代码:

    post_install do |installer|
        installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
            end
        end
    end
    

    然后再run一下pod install:

    arvin@ArvindeMacBook-Pro Dynalink % pod install
    Analyzing dependencies
    Downloading dependencies
    Generating Pods project
    Integrating client project
    Pod installation complete! There are 14 dependencies from the Podfile and 16 total pods installed.
    

    警告就消失了!

    相关文章

      网友评论

          本文标题:Xcode - 解决Cocoapods提示IPHONEOS_DE

          本文链接:https://www.haomeiwen.com/subject/kbhucltx.html