Created
December 22, 2016 09:35
-
-
Save vincent284/d285be8efddf6fe972c833bd66bc8fc6 to your computer and use it in GitHub Desktop.
[Cocoapods] Disable NSLog in pods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Only allow NSLog in DEBUG build, for all Pods | |
# Referenced from https://gist.github.com/krzyzanowskim/7690635 | |
# Pods-environment.h is no longer supported | |
post_install do | installer | | |
Dir.glob("#{installer.sandbox.target_support_files_root}/**/*.pch") do |item| | |
open(item, "a") do |file| | |
print "[post_install] Updating #{item}\n" | |
file.puts <<EOF | |
// Disable logs | |
#ifndef DEBUG | |
#define NSLog(...) | |
#endif | |
EOF | |
end | |
end | |
end |
xl20071926
commented
Oct 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment