Commit 13c09055e5c1f41edf17364527c611181f8728f4
1 parent
dbefdb1c
no message
Showing
5 changed files
with
45 additions
and
16 deletions
CNLiveUserAgreementManager.podspec
| ... | ... | @@ -38,10 +38,11 @@ TODO: 网家家-用户协议管理类. |
| 38 | 38 | |
| 39 | 39 | s.public_header_files = 'CNLiveUserAgreementManager/Classes/**/*.h' |
| 40 | 40 | # s.frameworks = 'UIKit', 'MapKit' |
| 41 | - | |
| 41 | + s.dependency 'CNLiveTripartiteManagement/AFNetworking' | |
| 42 | + | |
| 42 | 43 | #环境库 |
| 43 | 44 | s.dependency 'CNLiveEnvironment' |
| 44 | - | |
| 45 | + | |
| 45 | 46 | # 数据请求 |
| 46 | 47 | s.dependency 'CNLiveRequestBastKit' |
| 47 | 48 | |
| ... | ... | @@ -54,4 +55,6 @@ TODO: 网家家-用户协议管理类. |
| 54 | 55 | # 基类 |
| 55 | 56 | s.dependency 'CNLiveBaseClass' |
| 56 | 57 | |
| 58 | + s.static_framework = true | |
| 59 | + | |
| 57 | 60 | end | ... | ... |
CNLiveUserAgreementManager/Classes/CNLiveUserAgreementController.m
| ... | ... | @@ -8,6 +8,8 @@ |
| 8 | 8 | |
| 9 | 9 | #import "CNLiveUserAgreementController.h" |
| 10 | 10 | #import "WKWebViewJavascriptBridge.h" |
| 11 | + | |
| 12 | +#import "CNLiveEnvironment.h" | |
| 11 | 13 | #import "CNLiveWebView.h" |
| 12 | 14 | |
| 13 | 15 | @interface CNLiveUserAgreementController () |
| ... | ... | @@ -15,6 +17,12 @@ |
| 15 | 17 | @end |
| 16 | 18 | |
| 17 | 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 | 26 | #pragma mark - 交互 |
| 19 | 27 | - (void)interaction { |
| 20 | 28 | [super interaction]; | ... | ... |
Example/CNLiveUserAgreementManager.xcodeproj/project.pbxproj
| ... | ... | @@ -7,8 +7,7 @@ |
| 7 | 7 | objects = { |
| 8 | 8 | |
| 9 | 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 | 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; |
| 13 | 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; |
| 14 | 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; |
| ... | ... | @@ -24,6 +23,7 @@ |
| 24 | 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; |
| 25 | 24 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; |
| 26 | 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 | 27 | /* End PBXBuildFile section */ |
| 28 | 28 | |
| 29 | 29 | /* Begin PBXContainerItemProxy section */ |
| ... | ... | @@ -60,12 +60,12 @@ |
| 60 | 60 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; |
| 61 | 61 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; }; |
| 62 | 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 | 64 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; |
| 64 | 65 | 7A1C126D9A48DA93CC000266 /* CNLiveUserAgreementManager.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveUserAgreementManager.podspec; path = ../CNLiveUserAgreementManager.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; |
| 65 | 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 | 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 | 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 | 70 | /* End PBXFileReference section */ |
| 71 | 71 | |
| ... | ... | @@ -77,7 +77,7 @@ |
| 77 | 77 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, |
| 78 | 78 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, |
| 79 | 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 | 82 | runOnlyForDeploymentPostprocessing = 0; |
| 83 | 83 | }; |
| ... | ... | @@ -88,7 +88,7 @@ |
| 88 | 88 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, |
| 89 | 89 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, |
| 90 | 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 | 93 | runOnlyForDeploymentPostprocessing = 0; |
| 94 | 94 | }; |
| ... | ... | @@ -134,8 +134,8 @@ |
| 134 | 134 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, |
| 135 | 135 | 6003F591195388D20070C39A /* UIKit.framework */, |
| 136 | 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 | 140 | name = Frameworks; |
| 141 | 141 | sourceTree = "<group>"; |
| ... | ... | @@ -207,7 +207,8 @@ |
| 207 | 207 | 6003F586195388D20070C39A /* Sources */, |
| 208 | 208 | 6003F587195388D20070C39A /* Frameworks */, |
| 209 | 209 | 6003F588195388D20070C39A /* Resources */, |
| 210 | - 48D3F4744AFB84A218C63FC0 /* [CP] Embed Pods Frameworks */, | |
| 210 | + 84B4D3C5245014F60D009D82 /* [CP] Embed Pods Frameworks */, | |
| 211 | + 400F6002A926472238D1E11B /* [CP] Copy Pods Resources */, | |
| 211 | 212 | ); |
| 212 | 213 | buildRules = ( |
| 213 | 214 | ); |
| ... | ... | @@ -298,7 +299,25 @@ |
| 298 | 299 | /* End PBXResourcesBuildPhase section */ |
| 299 | 300 | |
| 300 | 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 | 321 | isa = PBXShellScriptBuildPhase; |
| 303 | 322 | buildActionMask = 2147483647; |
| 304 | 323 | files = ( |
| ... | ... | @@ -313,7 +332,6 @@ |
| 313 | 332 | "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework", |
| 314 | 333 | "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", |
| 315 | 334 | "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", |
| 316 | - "${BUILT_PRODUCTS_DIR}/CNLiveUserAgreementManager/CNLiveUserAgreementManager.framework", | |
| 317 | 335 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", |
| 318 | 336 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", |
| 319 | 337 | "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework", |
| ... | ... | @@ -328,7 +346,6 @@ |
| 328 | 346 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework", |
| 329 | 347 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", |
| 330 | 348 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", |
| 331 | - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserAgreementManager.framework", | |
| 332 | 349 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", |
| 333 | 350 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", |
| 334 | 351 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework", | ... | ... |
Example/CNLiveUserAgreementManager/CNLiveAppDelegate.m
| ... | ... | @@ -8,14 +8,16 @@ |
| 8 | 8 | |
| 9 | 9 | #import "CNLiveAppDelegate.h" |
| 10 | 10 | #import "CNLiveViewController.h" |
| 11 | +#import "CNLiveEnvironment.h" | |
| 11 | 12 | |
| 12 | 13 | @implementation CNLiveAppDelegate |
| 13 | 14 | |
| 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
| 15 | 16 | { |
| 17 | + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBusiness environmentType:CNLiveProductionAppStore]; | |
| 18 | + | |
| 16 | 19 | // Override point for customization after application launch. |
| 17 | 20 | UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[CNLiveViewController new]]; |
| 18 | - | |
| 19 | 21 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; |
| 20 | 22 | self.window.rootViewController = navCtrl; |
| 21 | 23 | [self.window makeKeyAndVisible]; | ... | ... |