Commit 5daecda86b95eb6fa5cf086692f801b292393906
1 parent
266bad67
no message
Showing
3 changed files
with
7 additions
and
29 deletions
CNLiveEnvironment.podspec
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; | ... | ... |