Commit 13c09055e5c1f41edf17364527c611181f8728f4

Authored by iOS-Xiaowen
1 parent dbefdb1c

no message

CNLiveUserAgreementManager.podspec
@@ -38,10 +38,11 @@ TODO: 网家家-用户协议管理类. @@ -38,10 +38,11 @@ TODO: 网家家-用户协议管理类.
38 38
39 s.public_header_files = 'CNLiveUserAgreementManager/Classes/**/*.h' 39 s.public_header_files = 'CNLiveUserAgreementManager/Classes/**/*.h'
40 # s.frameworks = 'UIKit', 'MapKit' 40 # s.frameworks = 'UIKit', 'MapKit'
41 - 41 + s.dependency 'CNLiveTripartiteManagement/AFNetworking'
  42 +
42 #环境库 43 #环境库
43 s.dependency 'CNLiveEnvironment' 44 s.dependency 'CNLiveEnvironment'
44 - 45 +
45 # 数据请求 46 # 数据请求
46 s.dependency 'CNLiveRequestBastKit' 47 s.dependency 'CNLiveRequestBastKit'
47 48
@@ -54,4 +55,6 @@ TODO: 网家家-用户协议管理类. @@ -54,4 +55,6 @@ TODO: 网家家-用户协议管理类.
54 # 基类 55 # 基类
55 s.dependency 'CNLiveBaseClass' 56 s.dependency 'CNLiveBaseClass'
56 57
  58 + s.static_framework = true
  59 +
57 end 60 end
CNLiveUserAgreementManager/Classes/CNLiveUserAgreementController.m
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
8 8
9 #import "CNLiveUserAgreementController.h" 9 #import "CNLiveUserAgreementController.h"
10 #import "WKWebViewJavascriptBridge.h" 10 #import "WKWebViewJavascriptBridge.h"
  11 +
  12 +#import "CNLiveEnvironment.h"
11 #import "CNLiveWebView.h" 13 #import "CNLiveWebView.h"
12 14
13 @interface CNLiveUserAgreementController () 15 @interface CNLiveUserAgreementController ()
@@ -15,6 +17,12 @@ @@ -15,6 +17,12 @@
15 @end 17 @end
16 18
17 @implementation CNLiveUserAgreementController 19 @implementation CNLiveUserAgreementController
  20 +- (void)createSubViews {
  21 + [super createSubViews];
  22 + UIColor *color = Business?[UIColor colorWithRed:72/255.0 green:168/255.0 blue:249/255.0 alpha:1.0]:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0];
  23 + self.webView.progressViewColor = color;
  24 + NSLog(@"%ld--------",Business);
  25 +}
18 #pragma mark - 交互 26 #pragma mark - 交互
19 - (void)interaction { 27 - (void)interaction {
20 [super interaction]; 28 [super interaction];
Example/CNLiveUserAgreementManager.xcodeproj/project.pbxproj
@@ -7,8 +7,7 @@ @@ -7,8 +7,7 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - 23CC09E48AC48F36CC6BD889 /* Pods_CNLiveUserAgreementManager_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B968693F48B36FE100161DD7 /* Pods_CNLiveUserAgreementManager_Example.framework */; };  
11 - 4BE43B569D12CAA1A1B21CB8 /* Pods_CNLiveUserAgreementManager_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 919A11E2C0D5C88E34C935D4 /* Pods_CNLiveUserAgreementManager_Tests.framework */; }; 10 + 3145327A7F4A4CB144A5B61F /* Pods_CNLiveUserAgreementManager_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D205C307E4D7EE5F0F4C40D /* Pods_CNLiveUserAgreementManager_Tests.framework */; };
12 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 11 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
13 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 12 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
14 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 13 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -24,6 +23,7 @@ @@ -24,6 +23,7 @@
24 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 23 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
25 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 24 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
26 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 25 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
  26 + 93F8DD481E887266C20F9941 /* Pods_CNLiveUserAgreementManager_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D476D897AAD6CE32EE685A42 /* Pods_CNLiveUserAgreementManager_Example.framework */; };
27 /* End PBXBuildFile section */ 27 /* End PBXBuildFile section */
28 28
29 /* Begin PBXContainerItemProxy section */ 29 /* Begin PBXContainerItemProxy section */
@@ -60,12 +60,12 @@ @@ -60,12 +60,12 @@
60 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 60 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
61 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; }; 61 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
62 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; 62 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
  63 + 6D205C307E4D7EE5F0F4C40D /* Pods_CNLiveUserAgreementManager_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveUserAgreementManager_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
63 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 64 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
64 7A1C126D9A48DA93CC000266 /* CNLiveUserAgreementManager.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveUserAgreementManager.podspec; path = ../CNLiveUserAgreementManager.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 65 7A1C126D9A48DA93CC000266 /* CNLiveUserAgreementManager.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveUserAgreementManager.podspec; path = ../CNLiveUserAgreementManager.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
65 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 66 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
66 - 919A11E2C0D5C88E34C935D4 /* Pods_CNLiveUserAgreementManager_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveUserAgreementManager_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };  
67 AACA5F9B3491663272E37D89 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; 67 AACA5F9B3491663272E37D89 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
68 - B968693F48B36FE100161DD7 /* Pods_CNLiveUserAgreementManager_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveUserAgreementManager_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 + D476D897AAD6CE32EE685A42 /* Pods_CNLiveUserAgreementManager_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveUserAgreementManager_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
69 F05340994516635CF3C0356C /* Pods-CNLiveUserAgreementManager_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveUserAgreementManager_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveUserAgreementManager_Tests/Pods-CNLiveUserAgreementManager_Tests.debug.xcconfig"; sourceTree = "<group>"; }; 69 F05340994516635CF3C0356C /* Pods-CNLiveUserAgreementManager_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveUserAgreementManager_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveUserAgreementManager_Tests/Pods-CNLiveUserAgreementManager_Tests.debug.xcconfig"; sourceTree = "<group>"; };
70 /* End PBXFileReference section */ 70 /* End PBXFileReference section */
71 71
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 77 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
78 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 78 6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
79 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 79 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
80 - 23CC09E48AC48F36CC6BD889 /* Pods_CNLiveUserAgreementManager_Example.framework in Frameworks */, 80 + 93F8DD481E887266C20F9941 /* Pods_CNLiveUserAgreementManager_Example.framework in Frameworks */,
81 ); 81 );
82 runOnlyForDeploymentPostprocessing = 0; 82 runOnlyForDeploymentPostprocessing = 0;
83 }; 83 };
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 88 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
89 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 89 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
90 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 90 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
91 - 4BE43B569D12CAA1A1B21CB8 /* Pods_CNLiveUserAgreementManager_Tests.framework in Frameworks */, 91 + 3145327A7F4A4CB144A5B61F /* Pods_CNLiveUserAgreementManager_Tests.framework in Frameworks */,
92 ); 92 );
93 runOnlyForDeploymentPostprocessing = 0; 93 runOnlyForDeploymentPostprocessing = 0;
94 }; 94 };
@@ -134,8 +134,8 @@ @@ -134,8 +134,8 @@
134 6003F58F195388D20070C39A /* CoreGraphics.framework */, 134 6003F58F195388D20070C39A /* CoreGraphics.framework */,
135 6003F591195388D20070C39A /* UIKit.framework */, 135 6003F591195388D20070C39A /* UIKit.framework */,
136 6003F5AF195388D20070C39A /* XCTest.framework */, 136 6003F5AF195388D20070C39A /* XCTest.framework */,
137 - B968693F48B36FE100161DD7 /* Pods_CNLiveUserAgreementManager_Example.framework */,  
138 - 919A11E2C0D5C88E34C935D4 /* Pods_CNLiveUserAgreementManager_Tests.framework */, 137 + D476D897AAD6CE32EE685A42 /* Pods_CNLiveUserAgreementManager_Example.framework */,
  138 + 6D205C307E4D7EE5F0F4C40D /* Pods_CNLiveUserAgreementManager_Tests.framework */,
139 ); 139 );
140 name = Frameworks; 140 name = Frameworks;
141 sourceTree = "<group>"; 141 sourceTree = "<group>";
@@ -207,7 +207,8 @@ @@ -207,7 +207,8 @@
207 6003F586195388D20070C39A /* Sources */, 207 6003F586195388D20070C39A /* Sources */,
208 6003F587195388D20070C39A /* Frameworks */, 208 6003F587195388D20070C39A /* Frameworks */,
209 6003F588195388D20070C39A /* Resources */, 209 6003F588195388D20070C39A /* Resources */,
210 - 48D3F4744AFB84A218C63FC0 /* [CP] Embed Pods Frameworks */, 210 + 84B4D3C5245014F60D009D82 /* [CP] Embed Pods Frameworks */,
  211 + 400F6002A926472238D1E11B /* [CP] Copy Pods Resources */,
211 ); 212 );
212 buildRules = ( 213 buildRules = (
213 ); 214 );
@@ -298,7 +299,25 @@ @@ -298,7 +299,25 @@
298 /* End PBXResourcesBuildPhase section */ 299 /* End PBXResourcesBuildPhase section */
299 300
300 /* Begin PBXShellScriptBuildPhase section */ 301 /* Begin PBXShellScriptBuildPhase section */
301 - 48D3F4744AFB84A218C63FC0 /* [CP] Embed Pods Frameworks */ = { 302 + 400F6002A926472238D1E11B /* [CP] Copy Pods Resources */ = {
  303 + isa = PBXShellScriptBuildPhase;
  304 + buildActionMask = 2147483647;
  305 + files = (
  306 + );
  307 + inputPaths = (
  308 + "${PODS_ROOT}/Target Support Files/Pods-CNLiveUserAgreementManager_Example/Pods-CNLiveUserAgreementManager_Example-resources.sh",
  309 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveUserAgreementManager/CNLiveUserAgreementManager.bundle",
  310 + );
  311 + name = "[CP] Copy Pods Resources";
  312 + outputPaths = (
  313 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveUserAgreementManager.bundle",
  314 + );
  315 + runOnlyForDeploymentPostprocessing = 0;
  316 + shellPath = /bin/sh;
  317 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveUserAgreementManager_Example/Pods-CNLiveUserAgreementManager_Example-resources.sh\"\n";
  318 + showEnvVarsInLog = 0;
  319 + };
  320 + 84B4D3C5245014F60D009D82 /* [CP] Embed Pods Frameworks */ = {
302 isa = PBXShellScriptBuildPhase; 321 isa = PBXShellScriptBuildPhase;
303 buildActionMask = 2147483647; 322 buildActionMask = 2147483647;
304 files = ( 323 files = (
@@ -313,7 +332,6 @@ @@ -313,7 +332,6 @@
313 "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework", 332 "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework",
314 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", 333 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",
315 "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", 334 "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework",
316 - "${BUILT_PRODUCTS_DIR}/CNLiveUserAgreementManager/CNLiveUserAgreementManager.framework",  
317 "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", 335 "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
318 "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", 336 "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework",
319 "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework", 337 "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework",
@@ -328,7 +346,6 @@ @@ -328,7 +346,6 @@
328 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework", 346 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework",
329 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", 347 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",
330 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", 348 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework",
331 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserAgreementManager.framework",  
332 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", 349 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
333 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", 350 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework",
334 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework", 351 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework",
Example/CNLiveUserAgreementManager/CNLiveAppDelegate.m
@@ -8,14 +8,16 @@ @@ -8,14 +8,16 @@
8 8
9 #import "CNLiveAppDelegate.h" 9 #import "CNLiveAppDelegate.h"
10 #import "CNLiveViewController.h" 10 #import "CNLiveViewController.h"
  11 +#import "CNLiveEnvironment.h"
11 12
12 @implementation CNLiveAppDelegate 13 @implementation CNLiveAppDelegate
13 14
14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 { 16 {
  17 + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBusiness environmentType:CNLiveProductionAppStore];
  18 +
16 // Override point for customization after application launch. 19 // Override point for customization after application launch.
17 UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[CNLiveViewController new]]; 20 UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[CNLiveViewController new]];
18 -  
19 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 21 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
20 self.window.rootViewController = navCtrl; 22 self.window.rootViewController = navCtrl;
21 [self.window makeKeyAndVisible]; 23 [self.window makeKeyAndVisible];
Example/Podfile
@@ -6,7 +6,6 @@ platform :ios, &#39;9.0&#39; @@ -6,7 +6,6 @@ platform :ios, &#39;9.0&#39;
6 6
7 target 'CNLiveUserAgreementManager_Example' do 7 target 'CNLiveUserAgreementManager_Example' do
8 pod 'CNLiveUserAgreementManager', :path => '../' 8 pod 'CNLiveUserAgreementManager', :path => '../'
9 -  
10 target 'CNLiveUserAgreementManager_Tests' do 9 target 'CNLiveUserAgreementManager_Tests' do
11 inherit! :search_paths 10 inherit! :search_paths
12 11