Skip to content

Instantly share code, notes, and snippets.

@paulz
Last active May 22, 2016 08:13
Show Gist options
  • Save paulz/e1fb44c96fdfbcbbb29086adb7100d3f to your computer and use it in GitHub Desktop.
Save paulz/e1fb44c96fdfbcbbb29086adb7100d3f to your computer and use it in GitHub Desktop.
Podfile post_install hook to fix EMBEDDED_CONTENT_CONTAINS_SWIFT
post_install do |installer|
ignore_overriding_contains_swift(installer, 'MyFramework')
end
def ignore_overriding_contains_swift(installer, framework_target)
target = installer.aggregate_targets.find{|t| t.name == "Pods-#{framework_target}"}
raise "failed to find #{framework_target} among: #{installer.aggregate_targets}" unless target
target.xcconfigs.each_value do |config|
config.attributes.delete('EMBEDDED_CONTENT_CONTAINS_SWIFT')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment