Commit 5daecda86b95eb6fa5cf086692f801b292393906

Authored by iOS-Xiaowen
1 parent 266bad67

no message

CNLiveEnvironment.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveEnvironment'
11   - s.version = '0.1.9'
  11 + s.version = '0.2.0'
12 12 s.summary = 'CNLiveEnvironment'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
... ... @@ -92,22 +92,6 @@
92 92 static CNLiveEnvironmentManager *_instance = nil;
93 93  
94 94 /**
95   - * 默认是测试商店版
96   - */
97   -+ (void)load{
98   -#ifdef DEBUG
99   - //测试商店版
100   - [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore];
101   -
102   -#else
103   - //正式商店版
104   - [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore];
105   -
106   -#endif
107   -
108   -}
109   -
110   -/**
111 95 * @abstract 单例初始化
112 96 */
113 97 + (instancetype)manager{
... ... @@ -144,9 +128,6 @@ static CNLiveEnvironmentManager *_instance = nil;
144 128 */
145 129 + (void)setEnvironment:(CNLiveEnvironmentType)environmentType{
146 130 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager];
147   - if(manager.environmentType == environmentType){
148   - return;
149   - }
150 131 manager.environmentType = environmentType;
151 132 switch (environmentType) {
152 133 #pragma mark - 测试企业环境
... ... @@ -557,9 +538,6 @@ static CNLiveEnvironmentManager *_instance = nil;
557 538 #pragma mark - ******** 企业端直播 ********
558 539 + (void)setBLiveEnvironment:(CNLiveEnvironmentType)environmentType{
559 540 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager];
560   - if(manager.environmentType == environmentType){
561   - return;
562   - }
563 541 manager.environmentType = environmentType;
564 542 manager.isBLive = YES;
565 543 switch (environmentType) {
... ...
Example/CNLiveEnvironment/XWAppDelegate.m
... ... @@ -14,15 +14,15 @@
14 14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 15 {
16 16  
17   - NSLog(@"%@",EnvironmentDesc);
  17 + NSLog(@"%@",DisplayName);
18 18 NSLog(@"%d",TestEnvironment);
19   - NSLog(@"%@",CNCategoryGetChannelUrl);
  19 + NSLog(@"%@",AppId);
20 20  
21   - [CNLiveEnvironmentManager setEnvironment:CNLiveProductionInHouse];
22   -
23   - NSLog(@"%@",EnvironmentDesc);
  21 + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBLive environmentType:CNLiveDebugAppStore];//CNLiveDebugAppStore//CNLiveProductionAppStore//CNLiveTestFlight
  22 +
  23 + NSLog(@"%@",DisplayName);
24 24 NSLog(@"%d",TestEnvironment);
25   - NSLog(@"%@",UMengAppKey);
  25 + NSLog(@"%@",AppId);
26 26  
27 27  
28 28 return YES;
... ...