Commit 5daecda86b95eb6fa5cf086692f801b292393906

Authored by iOS-Xiaowen
1 parent 266bad67

no message

CNLiveEnvironment.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveEnvironment' 10 s.name = 'CNLiveEnvironment'
11 - s.version = '0.1.9' 11 + s.version = '0.2.0'
12 s.summary = 'CNLiveEnvironment' 12 s.summary = 'CNLiveEnvironment'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
@@ -92,22 +92,6 @@ @@ -92,22 +92,6 @@
92 static CNLiveEnvironmentManager *_instance = nil; 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 * @abstract 单例初始化 95 * @abstract 单例初始化
112 */ 96 */
113 + (instancetype)manager{ 97 + (instancetype)manager{
@@ -144,9 +128,6 @@ static CNLiveEnvironmentManager *_instance = nil; @@ -144,9 +128,6 @@ static CNLiveEnvironmentManager *_instance = nil;
144 */ 128 */
145 + (void)setEnvironment:(CNLiveEnvironmentType)environmentType{ 129 + (void)setEnvironment:(CNLiveEnvironmentType)environmentType{
146 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager]; 130 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager];
147 - if(manager.environmentType == environmentType){  
148 - return;  
149 - }  
150 manager.environmentType = environmentType; 131 manager.environmentType = environmentType;
151 switch (environmentType) { 132 switch (environmentType) {
152 #pragma mark - 测试企业环境 133 #pragma mark - 测试企业环境
@@ -557,9 +538,6 @@ static CNLiveEnvironmentManager *_instance = nil; @@ -557,9 +538,6 @@ static CNLiveEnvironmentManager *_instance = nil;
557 #pragma mark - ******** 企业端直播 ******** 538 #pragma mark - ******** 企业端直播 ********
558 + (void)setBLiveEnvironment:(CNLiveEnvironmentType)environmentType{ 539 + (void)setBLiveEnvironment:(CNLiveEnvironmentType)environmentType{
559 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager]; 540 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager];
560 - if(manager.environmentType == environmentType){  
561 - return;  
562 - }  
563 manager.environmentType = environmentType; 541 manager.environmentType = environmentType;
564 manager.isBLive = YES; 542 manager.isBLive = YES;
565 switch (environmentType) { 543 switch (environmentType) {
Example/CNLiveEnvironment/XWAppDelegate.m
@@ -14,15 +14,15 @@ @@ -14,15 +14,15 @@
14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 { 15 {
16 16
17 - NSLog(@"%@",EnvironmentDesc); 17 + NSLog(@"%@",DisplayName);
18 NSLog(@"%d",TestEnvironment); 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 NSLog(@"%d",TestEnvironment); 24 NSLog(@"%d",TestEnvironment);
25 - NSLog(@"%@",UMengAppKey); 25 + NSLog(@"%@",AppId);
26 26
27 27
28 return YES; 28 return YES;