Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
Last active March 26, 2020 09:42
Show Gist options
  • Save krzyzanowskim/7690635 to your computer and use it in GitHub Desktop.
Save krzyzanowskim/7690635 to your computer and use it in GitHub Desktop.
Disable NSLog with all CocoaPods with post_install hook.
post_install do | installer |
print "Updating #{installer.sandbox.target_support_files_root}/Pods/Pods-environment.h\n"
open("#{installer.sandbox.target_support_files_root}/Pods/Pods-environment.h","a") do |file|
file.puts <<EOF
// Disable logs
#ifndef DEBUG
#define NSLog(...)
#endif
EOF
end
end
@LuanSiHo
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment