Commit 4f9e0403fed968224f666433afe15a534c93ac1f

Authored by yanglingyu
1 parent 75dfe8df

修复12系统闪退bug,添加注释

CNLiveBBASMModule/Classes/CNLiveBBASMImpl/CNManager/CNBBASMJumpService.h
@@ -11,16 +11,33 @@ @@ -11,16 +11,33 @@
11 11
12 NS_ASSUME_NONNULL_BEGIN 12 NS_ASSUME_NONNULL_BEGIN
13 @protocol CNBBASMJumpProtocol <NSObject,BHServiceProtocol> 13 @protocol CNBBASMJumpProtocol <NSObject,BHServiceProtocol>
14 - 14 +/**
  15 + 注册百度小程序
  16 + */
15 - (void)registerBBASMManager:(NSDictionary *)launchOptions; 17 - (void)registerBBASMManager:(NSDictionary *)launchOptions;
  18 +/**
  19 + 打开百度小程序
  20 + */
16 - (void)openBBASMModule:(NSString *)urlStr; 21 - (void)openBBASMModule:(NSString *)urlStr;
  22 +/**
  23 + 支付宝支付回调
  24 + */
17 - (BOOL)cashierHandleOpenUrl:(NSURL *)url; 25 - (BOOL)cashierHandleOpenUrl:(NSURL *)url;
  26 +/**
  27 + 退出百度账号登录
  28 +
  29 + */
18 - (void)accountLogout; 30 - (void)accountLogout;
19 31
20 @end 32 @end
21 @interface CNBBASMJumpService : NSObject<CNBBASMJumpProtocol> 33 @interface CNBBASMJumpService : NSObject<CNBBASMJumpProtocol>
  34 +/**
  35 + 分享百度小程序
  36 + */
22 + (void)shareBBASMWithParams:(NSDictionary *)params; 37 + (void)shareBBASMWithParams:(NSDictionary *)params;
23 - 38 +/**
  39 + 获取Description的zip路径
  40 + */
24 + (NSString *)getPluginDescriptionPath; 41 + (NSString *)getPluginDescriptionPath;
25 @end 42 @end
26 43
CNLiveBBASMModule/Classes/CNLiveBBASMImpl/CNManager/CNBBASMJumpService.m
@@ -17,14 +17,20 @@ @@ -17,14 +17,20 @@
17 @end 17 @end
18 //主要的跳转类型 18 //主要的跳转类型
19 static NSString *const CNLiveBBASMRouterWithMainkey = @"com.cnlive.CNLiveNetAdd://call.service.beehive/CNLiveBBASMModuleService.CNliveBBASMModuleProtocol."; 19 static NSString *const CNLiveBBASMRouterWithMainkey = @"com.cnlive.CNLiveNetAdd://call.service.beehive/CNLiveBBASMModuleService.CNliveBBASMModuleProtocol.";
  20 +//分享
20 static NSString *const CNLiveBBASMShareMethod = @"shareBBASMWithParams:"; 21 static NSString *const CNLiveBBASMShareMethod = @"shareBBASMWithParams:";
  22 +//获取zip
21 static NSString *const CNLiveBBASMGetPluginDesC = @"getPluginDescriptionPath"; 23 static NSString *const CNLiveBBASMGetPluginDesC = @"getPluginDescriptionPath";
  24 +
  25 +//注册协议
22 @BeeHiveService(CNBBASMJumpProtocol, CNBBASMJumpService) 26 @BeeHiveService(CNBBASMJumpProtocol, CNBBASMJumpService)
23 @implementation CNBBASMJumpService 27 @implementation CNBBASMJumpService
24 28
25 -(void)modSetUp:(BHContext *)context 29 -(void)modSetUp:(BHContext *)context
26 { 30 {
  31 + //增加主工程交互类
27 [[BHRouter globalRouter] addPathComponent:@"CNLiveBBASMModuleService" forClass:NSClassFromString(@"CNLiveBBASMModuleService")]; 32 [[BHRouter globalRouter] addPathComponent:@"CNLiveBBASMModuleService" forClass:NSClassFromString(@"CNLiveBBASMModuleService")];
  33 + //增加组件内交互类
28 [[BHRouter globalRouter] addPathComponent:@"CNBBASMJumpService" forClass:NSClassFromString(@"CNBBASMJumpService")]; 34 [[BHRouter globalRouter] addPathComponent:@"CNBBASMJumpService" forClass:NSClassFromString(@"CNBBASMJumpService")];
29 } 35 }
30 - (void)registerBBASMManager:(NSDictionary *)launchOptions 36 - (void)registerBBASMManager:(NSDictionary *)launchOptions
CNLiveBBASMModule/Classes/CNLiveBBASMImpl/CNVideo/CNVideoVC.m
@@ -153,7 +153,7 @@ @@ -153,7 +153,7 @@
153 NSBundle *bundle = [NSBundle bundleForClass:[self class]]; 153 NSBundle *bundle = [NSBundle bundleForClass:[self class]];
154 NSURL *path = [bundle URLForResource:@"ZFPlayer" withExtension:@"bundle"]; 154 NSURL *path = [bundle URLForResource:@"ZFPlayer" withExtension:@"bundle"];
155 NSBundle *imageBundle = [NSBundle bundleWithURL:path]; 155 NSBundle *imageBundle = [NSBundle bundleWithURL:path];
156 - [_playBtn setImage:[UIImage imageNamed:@"new_allPlay_44x44_" inBundle:imageBundle withConfiguration:nil] forState:UIControlStateNormal]; 156 + [_playBtn setImage:[UIImage imageNamed:@"new_allPlay_44x44_" inBundle:imageBundle compatibleWithTraitCollection:NULL] forState:UIControlStateNormal];
157 [_playBtn addTarget:self action:@selector(playClick:) forControlEvents:UIControlEventTouchUpInside]; 157 [_playBtn addTarget:self action:@selector(playClick:) forControlEvents:UIControlEventTouchUpInside];
158 } 158 }
159 return _playBtn; 159 return _playBtn;
Example/CNLiveBBASMModule.xcodeproj/project.pbxproj
@@ -7,9 +7,9 @@ @@ -7,9 +7,9 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
  10 + 080636B3273BA98500F599E8 /* libPaymentControlMini.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 080636B2273BA98500F599E8 /* libPaymentControlMini.a */; };
10 086F08172730E1F700B9D7EE /* CNLiveBBASMModuleService.m in Sources */ = {isa = PBXBuildFile; fileRef = 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */; }; 11 086F08172730E1F700B9D7EE /* CNLiveBBASMModuleService.m in Sources */ = {isa = PBXBuildFile; fileRef = 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */; };
11 086F0990273293A100B9D7EE /* BBAPluginDescription.zip in Resources */ = {isa = PBXBuildFile; fileRef = 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */; }; 12 086F0990273293A100B9D7EE /* BBAPluginDescription.zip in Resources */ = {isa = PBXBuildFile; fileRef = 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */; };
12 - 08DCFE6D273634E700659A1D /* libPaymentControlMini.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 08DCFE6C273634E700659A1D /* libPaymentControlMini.a */; };  
13 08DE2ED3273101B600C3BC16 /* CNAdaptSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08DE2ED2273101B600C3BC16 /* CNAdaptSwift.swift */; }; 13 08DE2ED3273101B600C3BC16 /* CNAdaptSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08DE2ED2273101B600C3BC16 /* CNAdaptSwift.swift */; };
14 08DE2EDB27310B0500C3BC16 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08DE2EDA27310B0500C3BC16 /* SystemConfiguration.framework */; }; 14 08DE2EDB27310B0500C3BC16 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08DE2EDA27310B0500C3BC16 /* SystemConfiguration.framework */; };
15 08DE2EDD27310B0F00C3BC16 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08DE2EDC27310B0F00C3BC16 /* CoreTelephony.framework */; }; 15 08DE2EDD27310B0F00C3BC16 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08DE2EDC27310B0F00C3BC16 /* CoreTelephony.framework */; };
@@ -52,11 +52,11 @@ @@ -52,11 +52,11 @@
52 /* End PBXContainerItemProxy section */ 52 /* End PBXContainerItemProxy section */
53 53
54 /* Begin PBXFileReference section */ 54 /* Begin PBXFileReference section */
  55 + 080636B0273BA98500F599E8 /* UPPaymentControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UPPaymentControl.h; sourceTree = "<group>"; };
  56 + 080636B2273BA98500F599E8 /* libPaymentControlMini.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libPaymentControlMini.a; sourceTree = "<group>"; };
55 086F08152730E1F700B9D7EE /* CNLiveBBASMModuleService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveBBASMModuleService.h; sourceTree = "<group>"; }; 57 086F08152730E1F700B9D7EE /* CNLiveBBASMModuleService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveBBASMModuleService.h; sourceTree = "<group>"; };
56 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveBBASMModuleService.m; sourceTree = "<group>"; }; 58 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveBBASMModuleService.m; sourceTree = "<group>"; };
57 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = BBAPluginDescription.zip; sourceTree = "<group>"; }; 59 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = BBAPluginDescription.zip; sourceTree = "<group>"; };
58 - 08DCFE6A273634E700659A1D /* UPPaymentControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UPPaymentControl.h; sourceTree = "<group>"; };  
59 - 08DCFE6C273634E700659A1D /* libPaymentControlMini.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libPaymentControlMini.a; sourceTree = "<group>"; };  
60 08DE2ED1273101B500C3BC16 /* CNLiveBBASMModule_Example-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveBBASMModule_Example-Bridging-Header.h"; sourceTree = "<group>"; }; 60 08DE2ED1273101B500C3BC16 /* CNLiveBBASMModule_Example-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveBBASMModule_Example-Bridging-Header.h"; sourceTree = "<group>"; };
61 08DE2ED2273101B600C3BC16 /* CNAdaptSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNAdaptSwift.swift; sourceTree = "<group>"; }; 61 08DE2ED2273101B600C3BC16 /* CNAdaptSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNAdaptSwift.swift; sourceTree = "<group>"; };
62 08DE2ED827310AEB00C3BC16 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 62 08DE2ED827310AEB00C3BC16 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
@@ -122,7 +122,7 @@ @@ -122,7 +122,7 @@
122 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 122 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
123 08DE2EE327310B2B00C3BC16 /* CFNetwork.framework in Frameworks */, 123 08DE2EE327310B2B00C3BC16 /* CFNetwork.framework in Frameworks */,
124 F9225E875B57360B1E21CA00 /* Pods_CNLiveBBASMModule_Example.framework in Frameworks */, 124 F9225E875B57360B1E21CA00 /* Pods_CNLiveBBASMModule_Example.framework in Frameworks */,
125 - 08DCFE6D273634E700659A1D /* libPaymentControlMini.a in Frameworks */, 125 + 080636B3273BA98500F599E8 /* libPaymentControlMini.a in Frameworks */,
126 08DE2EDB27310B0500C3BC16 /* SystemConfiguration.framework in Frameworks */, 126 08DE2EDB27310B0500C3BC16 /* SystemConfiguration.framework in Frameworks */,
127 08DE2EDD27310B0F00C3BC16 /* CoreTelephony.framework in Frameworks */, 127 08DE2EDD27310B0F00C3BC16 /* CoreTelephony.framework in Frameworks */,
128 08DE2EF027310B6900C3BC16 /* MobileCoreServices.framework in Frameworks */, 128 08DE2EF027310B6900C3BC16 /* MobileCoreServices.framework in Frameworks */,
@@ -142,47 +142,46 @@ @@ -142,47 +142,46 @@
142 /* End PBXFrameworksBuildPhase section */ 142 /* End PBXFrameworksBuildPhase section */
143 143
144 /* Begin PBXGroup section */ 144 /* Begin PBXGroup section */
145 - 086F08142730E10F00B9D7EE /* CNLiveBBASMModule */ = { 145 + 080636AE273BA98500F599E8 /* UPPay */ = {
146 isa = PBXGroup; 146 isa = PBXGroup;
147 children = ( 147 children = (
148 - 086F08152730E1F700B9D7EE /* CNLiveBBASMModuleService.h */,  
149 - 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */, 148 + 080636AF273BA98500F599E8 /* inc */,
  149 + 080636B1273BA98500F599E8 /* libs */,
150 ); 150 );
151 - path = CNLiveBBASMModule; 151 + path = UPPay;
152 sourceTree = "<group>"; 152 sourceTree = "<group>";
153 }; 153 };
154 - 086F0829273236C300B9D7EE /* Resources */ = { 154 + 080636AF273BA98500F599E8 /* inc */ = {
155 isa = PBXGroup; 155 isa = PBXGroup;
156 children = ( 156 children = (
157 - 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */, 157 + 080636B0273BA98500F599E8 /* UPPaymentControl.h */,
158 ); 158 );
159 - path = Resources; 159 + path = inc;
160 sourceTree = "<group>"; 160 sourceTree = "<group>";
161 }; 161 };
162 - 08DCFE68273634E700659A1D /* UPPay */ = { 162 + 080636B1273BA98500F599E8 /* libs */ = {
163 isa = PBXGroup; 163 isa = PBXGroup;
164 children = ( 164 children = (
165 - 08DCFE69273634E700659A1D /* inc */,  
166 - 08DCFE6B273634E700659A1D /* libs */, 165 + 080636B2273BA98500F599E8 /* libPaymentControlMini.a */,
167 ); 166 );
168 - name = UPPay;  
169 - path = ../../../../cnlive/Desktop/CNLibrary/UPPay; 167 + path = libs;
170 sourceTree = "<group>"; 168 sourceTree = "<group>";
171 }; 169 };
172 - 08DCFE69273634E700659A1D /* inc */ = { 170 + 086F08142730E10F00B9D7EE /* CNLiveBBASMModule */ = {
173 isa = PBXGroup; 171 isa = PBXGroup;
174 children = ( 172 children = (
175 - 08DCFE6A273634E700659A1D /* UPPaymentControl.h */, 173 + 086F08152730E1F700B9D7EE /* CNLiveBBASMModuleService.h */,
  174 + 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */,
176 ); 175 );
177 - path = inc; 176 + path = CNLiveBBASMModule;
178 sourceTree = "<group>"; 177 sourceTree = "<group>";
179 }; 178 };
180 - 08DCFE6B273634E700659A1D /* libs */ = { 179 + 086F0829273236C300B9D7EE /* Resources */ = {
181 isa = PBXGroup; 180 isa = PBXGroup;
182 children = ( 181 children = (
183 - 08DCFE6C273634E700659A1D /* libPaymentControlMini.a */, 182 + 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */,
184 ); 183 );
185 - path = libs; 184 + path = Resources;
186 sourceTree = "<group>"; 185 sourceTree = "<group>";
187 }; 186 };
188 6003F581195388D10070C39A = { 187 6003F581195388D10070C39A = {
@@ -211,7 +210,7 @@ @@ -211,7 +210,7 @@
211 6003F58C195388D20070C39A /* Frameworks */ = { 210 6003F58C195388D20070C39A /* Frameworks */ = {
212 isa = PBXGroup; 211 isa = PBXGroup;
213 children = ( 212 children = (
214 - 08DCFE68273634E700659A1D /* UPPay */, 213 + 080636AE273BA98500F599E8 /* UPPay */,
215 08DE2EEF27310B6900C3BC16 /* MobileCoreServices.framework */, 214 08DE2EEF27310B6900C3BC16 /* MobileCoreServices.framework */,
216 08DE2EED27310B6200C3BC16 /* AddressBook.framework */, 215 08DE2EED27310B6200C3BC16 /* AddressBook.framework */,
217 08DE2EEB27310B5A00C3BC16 /* AddressBookUI.framework */, 216 08DE2EEB27310B5A00C3BC16 /* AddressBookUI.framework */,
Example/Podfile
@@ -26,3 +26,23 @@ target &#39;CNLiveBBASMModule_Example&#39; do @@ -26,3 +26,23 @@ target &#39;CNLiveBBASMModule_Example&#39; do
26 26
27 end 27 end
28 end 28 end
  29 +
  30 +
  31 +# 描述表收集脚本,如果期望每次pod install都自动收集描述表,则添加如下代码
  32 +post_install do |installer|
  33 + root_path = File.dirname(__FILE__)
  34 + # 其中'/Resources/SwanResource'为描述表要输出的目录,宿主可以指定自己的目录
  35 + scheme_desc_path = "#{root_path}/Resources"
  36 + unless File::exist?(scheme_desc_path) then
  37 + puts "⚠️ 描述表保存路径 scheme_desc_path 不正确,请在Podfile中修正 ⚠️"
  38 + else
  39 + # 在末尾加 --diff 参数, 可以在更新描述表并时输出 diff 文件
  40 + output = `python Script/scheme_desc_collector.py #{root_path} #{scheme_desc_path}`
  41 + if $?.to_i != 0
  42 + puts "⚠️ 收集端能力描述表失败:⚠️\n#{output}"
  43 + else
  44 + puts "-------收集端能力描述表成功!-------"
  45 + puts "保存在目录:#{scheme_desc_path}"
  46 + end
  47 + end
  48 +end
Example/Podfile.lock
@@ -31,7 +31,7 @@ PODS: @@ -31,7 +31,7 @@ PODS:
31 - SMLibs (= 2.34.0) 31 - SMLibs (= 2.34.0)
32 - SSZipArchive 32 - SSZipArchive
33 - YYCache 33 - YYCache
34 - - CNLiveBBASMModule (0.0.8): 34 + - CNLiveBBASMModule (0.0.10):
35 - BBAMNPLib (~> 2.34.0) 35 - BBAMNPLib (~> 2.34.0)
36 - CNLiveBeeHive 36 - CNLiveBeeHive
37 - CNLiveEnvironment 37 - CNLiveEnvironment
@@ -494,7 +494,7 @@ SPEC CHECKSUMS: @@ -494,7 +494,7 @@ SPEC CHECKSUMS:
494 AlipaySDK-iOS: 8659cdb4403de7e5f26ad8b699864a9cbe53384c 494 AlipaySDK-iOS: 8659cdb4403de7e5f26ad8b699864a9cbe53384c
495 BaiduBCE: ca933eadbccac8f8254976c9181ca5f45ded948b 495 BaiduBCE: ca933eadbccac8f8254976c9181ca5f45ded948b
496 BBAMNPLib: 070a935319cfd816f29d00c88012a496f7448229 496 BBAMNPLib: 070a935319cfd816f29d00c88012a496f7448229
497 - CNLiveBBASMModule: d7fd9bfd6db7c2a1b390356ca79ab4f3f76f6b8c 497 + CNLiveBBASMModule: 4d1d625a503967002066603a7cb3f831faa99205
498 CNLiveBeeHive: 1e105b15b6ccaad546258fcf91231563beb853d4 498 CNLiveBeeHive: 1e105b15b6ccaad546258fcf91231563beb853d4
499 CNLiveCommonCategory: 11c736c733ab9c3ea27426d2fafff31a92f0286e 499 CNLiveCommonCategory: 11c736c733ab9c3ea27426d2fafff31a92f0286e
500 CNLiveEnvironment: 6af0a2f332b704ffdec67106b4ba044c7f8da371 500 CNLiveEnvironment: 6af0a2f332b704ffdec67106b4ba044c7f8da371
@@ -523,6 +523,6 @@ SPEC CHECKSUMS: @@ -523,6 +523,6 @@ SPEC CHECKSUMS:
523 Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089 523 Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089
524 YYCache: 8105b6638f5e849296c71f331ff83891a4942952 524 YYCache: 8105b6638f5e849296c71f331ff83891a4942952
525 525
526 -PODFILE CHECKSUM: 9cdcda91661964c8692e6f2a81afe7a99b215d88 526 +PODFILE CHECKSUM: e374a9d58690aca136da7013d46a36df8f29a9ab
527 527
528 COCOAPODS: 1.11.2 528 COCOAPODS: 1.11.2