Skip to content

Instantly share code, notes, and snippets.

@nighthawk
Created August 15, 2015 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nighthawk/ca9f31f120fb04172121 to your computer and use it in GitHub Desktop.
Save nighthawk/ca9f31f120fb04172121 to your computer and use it in GitHub Desktop.
Post-install hook
post_install do |installer|
# installer.pods_project.targets.each do |target| # 0.38+
installer.project.targets.each do |target| # 0.37
# https://github.com/AFNetworking/AFNetworking/issues/2321
# https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md#highlighted-enhancement-that-needs-testing
# This can get removed in AFNetworking 2.6.0+
# Make sure to have 'deduplicate_targets: false' in ' ~/.cocoapods/config.yaml'
if target.name == "Pods-MYAPPNAME-AFNetworking"
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'AF_APP_EXTENSIONS=1']
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment