Latest 0.1.0
Homepage https://github.com/JianglingZheng/MFEnvironmentWatcher
License MIT
Platforms ios 8.0
Frameworks Foundation, UIKit
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

  1. Add Settings.bundle and MFEnvironmentConfig.plist to your project just like the example project.

  2. [Optional] Add your custom property to MFEnvironmentConfig.plist and add the correspoding category to the MFEnvironmentConfig class.

  3. 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
  4. Switch environment in the system settings menu, the watcher will abort app and apply the correspoding config when detect the change.

    MFEnvironmentWatcher

Installation

MFEnvironmentWatcher is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MFEnvironmentWatcher"

Author

[email protected]

License

MFEnvironmentWatcher is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MFEnvironmentWatcher",
    "version": "0.1.0",
    "summary": "An environment watching tool.",
    "homepage": "https://github.com/JianglingZheng/MFEnvironmentWatcher",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jiangling Zheng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JianglingZheng/MFEnvironmentWatcher.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MFEnvironmentWatcher/*.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This