Commit abbd91f6cab174e44b62f400edc9bc85c50adfe2
1 parent
6da16ff8
no message
Showing
5 changed files
with
10 additions
and
18 deletions
CNLiveEnvironment.podspec
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | Pod::Spec.new do |s| |
| 10 | 10 | s.name = 'CNLiveEnvironment' |
| 11 | 11 | s.version = '0.0.1' |
| 12 | - s.summary = '网家家环境' | |
| 12 | + s.summary = '网家家环境.' | |
| 13 | 13 | |
| 14 | 14 | # This description is used to generate tags and improve search results. |
| 15 | 15 | # * Think: What does it do? Why did you write it? What is the focus? |
| ... | ... | @@ -31,7 +31,6 @@ TODO: Add long description of the pod here. |
| 31 | 31 | s.ios.deployment_target = '9.0' |
| 32 | 32 | |
| 33 | 33 | s.source_files = 'CNLiveEnvironment/Classes/**/*' |
| 34 | - s.dependency 'CNLiveServices' | |
| 35 | 34 | |
| 36 | 35 | # s.resource_bundles = { |
| 37 | 36 | # 'CNLiveEnvironment' => ['CNLiveEnvironment/Assets/*.png'] | ... | ... |
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.h
| ... | ... | @@ -7,17 +7,16 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import <Foundation/Foundation.h> |
| 10 | -#import "CNLiveEnvironmentServiceProtocol.h" | |
| 11 | 10 | |
| 12 | 11 | NS_ASSUME_NONNULL_BEGIN |
| 13 | 12 | |
| 14 | -//typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { | |
| 15 | -// CNLiveDebugInHouse = 0,//测试企业环境 | |
| 16 | -// CNLiveProductionInHouse = 1,//正式企业环境 | |
| 17 | -// CNLiveDebugAppStore = 2,//测试商店环境 | |
| 18 | -// CNLiveProductionAppStore = 3 //正式商店环境 | |
| 19 | -// | |
| 20 | -//}; | |
| 13 | +typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { | |
| 14 | + CNLiveDebugInHouse = 0,//测试企业环境 | |
| 15 | + CNLiveProductionInHouse = 1,//正式企业环境 | |
| 16 | + CNLiveDebugAppStore = 2,//测试商店环境 | |
| 17 | + CNLiveProductionAppStore = 3 //正式商店环境 | |
| 18 | + | |
| 19 | +}; | |
| 21 | 20 | |
| 22 | 21 | @interface CNLiveEnvironmentManager : NSObject |
| 23 | 22 | ... | ... |
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
| ... | ... | @@ -8,9 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | #import "CNLiveEnvironmentManager.h" |
| 10 | 10 | |
| 11 | -@BeeHiveService(CNLiveEnvironmentServiceProtocol,CNLiveEnvironmentManager) | |
| 12 | - | |
| 13 | -@interface CNLiveEnvironmentManager()<CNLiveEnvironmentServiceProtocol> | |
| 11 | +@interface CNLiveEnvironmentManager() | |
| 14 | 12 | @property (nonatomic, assign, readwrite) CNLiveEnvironmentType isEnvironment; //详细环境 |
| 15 | 13 | @property (nonatomic, assign, readwrite) BOOL isTestEnvironment; // 是否是测试环境 |
| 16 | 14 | ... | ... |
Example/CNLiveEnvironment.xcodeproj/project.pbxproj
| ... | ... | @@ -306,14 +306,12 @@ |
| 306 | 306 | ); |
| 307 | 307 | inputPaths = ( |
| 308 | 308 | "${PODS_ROOT}/Target Support Files/Pods-CNLiveEnvironment_Example/Pods-CNLiveEnvironment_Example-frameworks.sh", |
| 309 | - "${BUILT_PRODUCTS_DIR}/BeeHive/BeeHive.framework", | |
| 310 | 309 | "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework", |
| 311 | 310 | ); |
| 312 | 311 | name = "[CP] Embed Pods Frameworks"; |
| 313 | 312 | outputFileListPaths = ( |
| 314 | 313 | ); |
| 315 | 314 | outputPaths = ( |
| 316 | - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BeeHive.framework", | |
| 317 | 315 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework", |
| 318 | 316 | ); |
| 319 | 317 | runOnlyForDeploymentPostprocessing = 0; | ... | ... |
Example/CNLiveEnvironment/XWViewController.m
| ... | ... | @@ -8,7 +8,6 @@ |
| 8 | 8 | |
| 9 | 9 | #import "XWViewController.h" |
| 10 | 10 | #import "CNLiveEnvironment.h" |
| 11 | -#import "CNLiveEnvironmentServiceProtocol.h" | |
| 12 | 11 | |
| 13 | 12 | @interface XWViewController () |
| 14 | 13 | |
| ... | ... | @@ -22,8 +21,7 @@ |
| 22 | 21 | // Do any additional setup after loading the view, typically from a nib. |
| 23 | 22 | NSLog(@"%@",EnvironmentDesc); |
| 24 | 23 | NSLog(@"%@",DisplayName); |
| 25 | - id<CNLiveEnvironmentServiceProtocol> environment = [[BeeHive shareInstance] createService:@protocol(CNLiveEnvironmentServiceProtocol)]; | |
| 26 | - [environment setEnvironment:CNLiveProductionAppStore]; | |
| 24 | + [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; | |
| 27 | 25 | NSLog(@"%@",EnvironmentDesc); |
| 28 | 26 | NSLog(@"%@",DisplayName); |
| 29 | 27 | ... | ... |