-
Notifications
You must be signed in to change notification settings - Fork 387
Disabling logging
By default, in Debug builds only, INTULocationManager will log info to the console when significant events occur. If you'd like to completely disable logging for INTULocationManager, you simply need to define the preprocessor macro INTU_ENABLE_LOGGING=0
.
Here are the steps to do this:
You probably don't want to modify the Pods
project (and the Pods-INTULocationManager
target it contains) by hand because it is regenerated every time you run pod install
. Instead, you should use a post_install
hook to have the preprocessor macro automatically added every time you run pod install
.
At the end of your Podfile
, add the following post_install
hook:
post_install do |installer_representation|
# NOTE: If you are using a CocoaPods version prior to 0.38, replace `pods_project` with `project` on the below line
installer_representation.pods_project.targets.each do |target|
if target.name.end_with? "INTULocationManager"
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = ['$(inherited)', 'INTU_ENABLE_LOGGING=0']
end
end
end
end
The above post_install
hook will define the macro INTU_ENABLE_LOGGING=0
for every build configuration on all INTULocationManager
targets in the generated Pods
project.
- In Xcode, click on your Project
- Click on the Target for your app
- Click Build Settings
- Find (or search) Preprocessor Macros under
Apple LLVM 6.0 - Preprocessing
- For all build configurations (Debug & Release) add the macro:
INTU_ENABLE_LOGGING=0
Now, even in Debug builds, PureLayout will not log to the console.