Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
If you want to import framework for higher OS version than your app's deployment target, you need to add this snippet in your Podfile. It makes the framework import weak, so it is ignored for the cases, where the framework is not available. Otherwise, your app will crash immediately, when it tries to import the framework.
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
if target.name == '_The pod name_'
target.build_configurations.each do |config|
config.build_settings['OTHER_LDFLAGS'] = ["-weak_framework", "\"_The native framework name_\""]
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.