TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Feb 2017 |
Maintained by Jiangling Zheng.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Add Settings.bundle and MFEnvironmentConfig.plist to your project just like the example project.
[Optional] Add your custom property to MFEnvironmentConfig.plist and add the correspoding category to the MFEnvironmentConfig class.
Run settings_buddy.rb script in release build to remove the environment option from settings menu.
e.g. Add below codes to the Build Phases, you can also replace the DEBUG macro with other macro.
do_remove = 1
if [ "$DEBUG" == "true" ]; then
do_remove = 0
fi
if [ $do_remove -eq 1 ]; then
${SOURCE_ROOT}/path/to/settings_buddy.rb -s "${SOURCE_ROOT}" -i "kMFUserDefaultsCurrentEnvironment"
fi
Switch environment in the system settings menu, the watcher will abort app and apply the correspoding config when detect the change.
MFEnvironmentWatcher is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MFEnvironmentWatcher"
MFEnvironmentWatcher is available under the MIT license. See the LICENSE file for more info.