Skip to content

Instantly share code, notes, and snippets.

@OdNairy
Created January 17, 2014 07:49
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 OdNairy/8469800 to your computer and use it in GitHub Desktop.
Save OdNairy/8469800 to your computer and use it in GitHub Desktop.
Disable Magical Record in Podfile for CocoaPods
class Pod::Podfile
def self.MR_disable_logging(installer)
target = installer.project.targets.find{|t| t.to_s == "Pods-MagicalRecord"}
target.build_configurations.each do |config|
s = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS']
s = [ '$(inherited)' ] if s == nil;
s.push('MR_ENABLE_ACTIVE_RECORD_LOGGING=0') if config.to_s == "Debug";
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = s
end
end
end
post_install do |installer|
Pod::Podfile::MR_disable_logging(installer)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment