升级xcode12.5后报错 cannot initialize a parameter of type 'is<NSCopying>_Nonnull' with an rvalue of ty...

1
2

经过多次查找,终于找到了解决的办法

直接在 Podfile 添加以下代码:

  post_installdo|installer|

      ## Fix for XCode 12.5

  find_and_replace("Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm","layoutCache[currentClass] = ivars;", "layoutCache[(id)currentClass] = ivars;")

  end

end

deffind_and_replace(dir, findstr, replacestr)

  Dir[dir].eachdo|name|

      text = File.read(name)

      replace = text.gsub(findstr,replacestr)

      iftext != replace

        puts"Fix: "+ name

        File.open(name,"w"){ |file| file.puts replace }

       STDOUT.flush

      end

  end

  Dir[dir +'*/'].each(&method(:find_and_replace))

end

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容