Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 12 Module 'RxSwift' was not compiled with library evolution support; using it means binary compatibility for '' can't be guaranteed

Tags:

xcode

ios

swift

Once updated to Xcode 12, several warnings showed up:

Module 'RxSwift' was not compiled with library evolution support; using it means binary compatibility for 'app' can't be guaranteed

enter image description here

like image 534
Mohamed ALOUANE Avatar asked Nov 16 '22 05:11

Mohamed ALOUANE


1 Answers

The reason you're getting these warnings is because the pods are missing the BUILD_LIBRARY_FOR_DISTRIBUTION flag in their build settings.

Add the following post_install script to your podfile and make sure it's outside your target 'app' do block:

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

Check out the following issue for more details: https://github.com/CocoaPods/CocoaPods/issues/9232

I wouldn't take this warning lightly. See below discussion on the swift forums: https://forums.swift.org/t/risks-of-compiler-warning-module-was-not-compiled-with-library-evolution-support/33941

like image 51
whyp Avatar answered Dec 17 '22 17:12

whyp