In Xcode 9 I'm getting the following suggestion for a cocoa pods project:
What does it do? And, shall I turn it on, or it will break things up?
Swift version: 5.6. Whole module optimization is a compiler pass that can add significant performance gains, and so it's always worth enabling when doing a release build of your app for the App Store.
GitHub - CocoaPods/cocoapods-deintegrate: A CocoaPods plugin to remove and de-integrate CocoaPods from your project. A CocoaPods plugin to remove and de-integrate CocoaPods from your project.
You can have this automatically enabled each time you run pods install
by adding the below post_install
script to the end of your Podfile
.
post_install do |installer| installer.pods_project.build_configurations.each do |config| if config.name == 'Release' config.build_settings['SWIFT_COMPILATION_MODE'] = 'wholemodule' end end end
In older versions of Xcode you will need:
post_install do |installer| installer.pods_project.build_configurations.each do |config| if config.name == 'Release' config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Owholemodule' else config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone' end end end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With