Last active
March 26, 2020 09:42
-
-
Save krzyzanowskim/7690635 to your computer and use it in GitHub Desktop.
Disable NSLog with all CocoaPods with post_install hook.
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
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 |
@krzyzanowskim good idea, but this doesn't work anymore. We should somehow modify all the .pch files from pods. Any idea how?
https://gist.github.com/vincent284/d285be8efddf6fe972c833bd66bc8fc6
This post gonna help you guys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, it doesn't work since CocoaPods 0.39.0 as the file
Pods-environment.h
do not exist