2021-10-15

 升级Xcode13遇到的坑 解决记录

1.Pods/Headers/Private/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: 'atomic_notify_one' is unavailable 

之前在Xcode12上也遇到过类似的问题

解决办法,在podfile文件中进行重写和替换

de ffind_and_replace(dir, findstr, replacestr)

  Dir[dir].each do |name|

      text = File.read(name)

      replace = text.gsub(findstr,replacestr)

      if text != replace

          puts"Fix: "+ name

          system("chmod +w "+ name)

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

          STDOUT.flush

      end

  end

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

end

通过chmod 增加写权限

然后进行查找替换

 find_and_replace("Pods/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h",

                               "atomic_notify_one(state)", "folly::atomic_notify_one(state)")

你可能感兴趣的:(2021-10-15)