Created
February 16, 2020 14:13
-
-
Save pofat/c8ad79f28fd58d824a906d01bd5ceb58 to your computer and use it in GitHub Desktop.
Turn your pods into statically linked
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add these in your Podfile (available for CocoaPods v1.7.x+) | |
# Replace with any Pods that you want to keep dynamically linked | |
keep_dynamically_linked = ['RxCocoa', 'RxSwift'] | |
target 'YourApp' do | |
# all you pods here... | |
end | |
pre_install do |installer| | |
puts "Make pods linked statically except reserved pods" | |
installer.pod_targets.each do |pod| | |
if !keep_dynamically_linked.include?(pod.name) | |
puts "Override the static_framework? method for #{pod.name}" | |
def pod.build_type; | |
Pod::Target::BuildType.static_framework | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment