willzh / SZDebugBall

App内环境切换

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SZDebugBall

CI Status Version License Platform

Feature

  1. 环境切换
  • 手动切换环境
  • 代码切换环境
  • 新增环境
  • 删除环境
  1. 查看 App 本地文件(beta)
  2. 查看页面层级(beta)
  3. 查看 UserDefaults(beta)

Example

#import <SZDebugBall/SZDebugBall.h>
[SZEnvironmentManager configEnvs:@[@"开发", @"测试", @"生产"] address:@[@"http://www.api.com/develop", @"http://www.api.com/test", @"http://www.api.com/product"]];

[SZEnvironmentManager configCurrentAddress:@"http://www.api.com/develop"];

NSLog(@"BASE_URL:%@", [SZEnvironmentManager currentAddress]);

/// 环境切换成功后的通知。环境切换成功后,会自动退出 App 一次。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(environmentChanged:) name:SZEnvironmentChangedNotification object:nil];

Screenshot

screenshot

Installation

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

pod 'SZDebugBall'

License

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

About

App内环境切换

License:MIT License


Languages

Language:Objective-C 98.3%Language:Ruby 1.7%