Skip to content

Instantly share code, notes, and snippets.

@pofat

pofat/Podfile

Created Feb 16, 2020
Embed
What would you like to do?
Turn your pods into statically linked
# 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