美文网首页
升级xcode15遇到的问题

升级xcode15遇到的问题

作者: dlxfly | 来源:发表于2023-10-19 09:25 被阅读0次

    写在最前
    升到mac os 14 ,xcode 14.3.1就不给用了,必须使用xcode 15+,所以遇上问题必须解决,尤其是引入了一下小公司的SDK,更新不及时,所以慎重升级。

    1. 编译报错 DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

    Podfile最后加上以下代码 并pod install

    post_install do |installer|
      installer.generated_projects.each do |project|
        project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'  
             end
        end
      end
      
      installer.aggregate_targets.each do |target|
        target.xcconfigs.each do |variant, xcconfig|
          xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
          IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
        end
      end
      
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
            xcconfig_path = config.base_configuration_reference.real_path
            IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
          end
        end
      end
       
    end
    
    

    2.个推报错
    升级到最新,并且只支持iOS 12+

    3.友盟QQ分享报错
    暂时无解,密切关注友盟官网

    相关文章

      网友评论

          本文标题:升级xcode15遇到的问题

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