Commit 4f9e0403fed968224f666433afe15a534c93ac1f

Authored by yanglingyu
1 parent 75dfe8df

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

CNLiveBBASMModule/Classes/CNLiveBBASMImpl/CNManager/CNBBASMJumpService.h
... ... @@ -11,16 +11,33 @@
11 11  
12 12 NS_ASSUME_NONNULL_BEGIN
13 13 @protocol CNBBASMJumpProtocol <NSObject,BHServiceProtocol>
14   -
  14 +/**
  15 + 注册百度小程序
  16 + */
15 17 - (void)registerBBASMManager:(NSDictionary *)launchOptions;
  18 +/**
  19 + 打开百度小程序
  20 + */
16 21 - (void)openBBASMModule:(NSString *)urlStr;
  22 +/**
  23 + 支付宝支付回调
  24 + */
17 25 - (BOOL)cashierHandleOpenUrl:(NSURL *)url;
  26 +/**
  27 + 退出百度账号登录
  28 +
  29 + */
18 30 - (void)accountLogout;
19 31  
20 32 @end
21 33 @interface CNBBASMJumpService : NSObject<CNBBASMJumpProtocol>
  34 +/**
  35 + 分享百度小程序
  36 + */
22 37 + (void)shareBBASMWithParams:(NSDictionary *)params;
23   -
  38 +/**
  39 + 获取Description的zip路径
  40 + */
24 41 + (NSString *)getPluginDescriptionPath;
25 42 @end
26 43  
... ...
CNLiveBBASMModule/Classes/CNLiveBBASMImpl/CNManager/CNBBASMJumpService.m
... ... @@ -17,14 +17,20 @@
17 17 @end
18 18 //主要的跳转类型
19 19 static NSString *const CNLiveBBASMRouterWithMainkey = @"com.cnlive.CNLiveNetAdd://call.service.beehive/CNLiveBBASMModuleService.CNliveBBASMModuleProtocol.";
  20 +//分享
20 21 static NSString *const CNLiveBBASMShareMethod = @"shareBBASMWithParams:";
  22 +//获取zip
21 23 static NSString *const CNLiveBBASMGetPluginDesC = @"getPluginDescriptionPath";
  24 +
  25 +//注册协议
22 26 @BeeHiveService(CNBBASMJumpProtocol, CNBBASMJumpService)
23 27 @implementation CNBBASMJumpService
24 28  
25 29 -(void)modSetUp:(BHContext *)context
26 30 {
  31 + //增加主工程交互类
27 32 [[BHRouter globalRouter] addPathComponent:@"CNLiveBBASMModuleService" forClass:NSClassFromString(@"CNLiveBBASMModuleService")];
  33 + //增加组件内交互类
28 34 [[BHRouter globalRouter] addPathComponent:@"CNBBASMJumpService" forClass:NSClassFromString(@"CNBBASMJumpService")];
29 35 }
30 36 - (void)registerBBASMManager:(NSDictionary *)launchOptions
... ...
CNLiveBBASMModule/Classes/CNLiveBBASMImpl/CNVideo/CNVideoVC.m
... ... @@ -153,7 +153,7 @@
153 153 NSBundle *bundle = [NSBundle bundleForClass:[self class]];
154 154 NSURL *path = [bundle URLForResource:@"ZFPlayer" withExtension:@"bundle"];
155 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 157 [_playBtn addTarget:self action:@selector(playClick:) forControlEvents:UIControlEventTouchUpInside];
158 158 }
159 159 return _playBtn;
... ...
Example/CNLiveBBASMModule.xcodeproj/project.pbxproj
... ... @@ -7,9 +7,9 @@
7 7 objects = {
8 8  
9 9 /* Begin PBXBuildFile section */
  10 + 080636B3273BA98500F599E8 /* libPaymentControlMini.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 080636B2273BA98500F599E8 /* libPaymentControlMini.a */; };
10 11 086F08172730E1F700B9D7EE /* CNLiveBBASMModuleService.m in Sources */ = {isa = PBXBuildFile; fileRef = 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */; };
11 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 13 08DE2ED3273101B600C3BC16 /* CNAdaptSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08DE2ED2273101B600C3BC16 /* CNAdaptSwift.swift */; };
14 14 08DE2EDB27310B0500C3BC16 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08DE2EDA27310B0500C3BC16 /* SystemConfiguration.framework */; };
15 15 08DE2EDD27310B0F00C3BC16 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08DE2EDC27310B0F00C3BC16 /* CoreTelephony.framework */; };
... ... @@ -52,11 +52,11 @@
52 52 /* End PBXContainerItemProxy section */
53 53  
54 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 57 086F08152730E1F700B9D7EE /* CNLiveBBASMModuleService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveBBASMModuleService.h; sourceTree = "<group>"; };
56 58 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveBBASMModuleService.m; sourceTree = "<group>"; };
57 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 60 08DE2ED1273101B500C3BC16 /* CNLiveBBASMModule_Example-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveBBASMModule_Example-Bridging-Header.h"; sourceTree = "<group>"; };
61 61 08DE2ED2273101B600C3BC16 /* CNAdaptSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNAdaptSwift.swift; sourceTree = "<group>"; };
62 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 122 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
123 123 08DE2EE327310B2B00C3BC16 /* CFNetwork.framework in Frameworks */,
124 124 F9225E875B57360B1E21CA00 /* Pods_CNLiveBBASMModule_Example.framework in Frameworks */,
125   - 08DCFE6D273634E700659A1D /* libPaymentControlMini.a in Frameworks */,
  125 + 080636B3273BA98500F599E8 /* libPaymentControlMini.a in Frameworks */,
126 126 08DE2EDB27310B0500C3BC16 /* SystemConfiguration.framework in Frameworks */,
127 127 08DE2EDD27310B0F00C3BC16 /* CoreTelephony.framework in Frameworks */,
128 128 08DE2EF027310B6900C3BC16 /* MobileCoreServices.framework in Frameworks */,
... ... @@ -142,47 +142,46 @@
142 142 /* End PBXFrameworksBuildPhase section */
143 143  
144 144 /* Begin PBXGroup section */
145   - 086F08142730E10F00B9D7EE /* CNLiveBBASMModule */ = {
  145 + 080636AE273BA98500F599E8 /* UPPay */ = {
146 146 isa = PBXGroup;
147 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 152 sourceTree = "<group>";
153 153 };
154   - 086F0829273236C300B9D7EE /* Resources */ = {
  154 + 080636AF273BA98500F599E8 /* inc */ = {
155 155 isa = PBXGroup;
156 156 children = (
157   - 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */,
  157 + 080636B0273BA98500F599E8 /* UPPaymentControl.h */,
158 158 );
159   - path = Resources;
  159 + path = inc;
160 160 sourceTree = "<group>";
161 161 };
162   - 08DCFE68273634E700659A1D /* UPPay */ = {
  162 + 080636B1273BA98500F599E8 /* libs */ = {
163 163 isa = PBXGroup;
164 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 168 sourceTree = "<group>";
171 169 };
172   - 08DCFE69273634E700659A1D /* inc */ = {
  170 + 086F08142730E10F00B9D7EE /* CNLiveBBASMModule */ = {
173 171 isa = PBXGroup;
174 172 children = (
175   - 08DCFE6A273634E700659A1D /* UPPaymentControl.h */,
  173 + 086F08152730E1F700B9D7EE /* CNLiveBBASMModuleService.h */,
  174 + 086F08162730E1F700B9D7EE /* CNLiveBBASMModuleService.m */,
176 175 );
177   - path = inc;
  176 + path = CNLiveBBASMModule;
178 177 sourceTree = "<group>";
179 178 };
180   - 08DCFE6B273634E700659A1D /* libs */ = {
  179 + 086F0829273236C300B9D7EE /* Resources */ = {
181 180 isa = PBXGroup;
182 181 children = (
183   - 08DCFE6C273634E700659A1D /* libPaymentControlMini.a */,
  182 + 086F098F273293A100B9D7EE /* BBAPluginDescription.zip */,
184 183 );
185   - path = libs;
  184 + path = Resources;
186 185 sourceTree = "<group>";
187 186 };
188 187 6003F581195388D10070C39A = {
... ... @@ -211,7 +210,7 @@
211 210 6003F58C195388D20070C39A /* Frameworks */ = {
212 211 isa = PBXGroup;
213 212 children = (
214   - 08DCFE68273634E700659A1D /* UPPay */,
  213 + 080636AE273BA98500F599E8 /* UPPay */,
215 214 08DE2EEF27310B6900C3BC16 /* MobileCoreServices.framework */,
216 215 08DE2EED27310B6200C3BC16 /* AddressBook.framework */,
217 216 08DE2EEB27310B5A00C3BC16 /* AddressBookUI.framework */,
... ...
Example/Podfile
... ... @@ -26,3 +26,23 @@ target &#39;CNLiveBBASMModule_Example&#39; do
26 26  
27 27 end
28 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 31 - SMLibs (= 2.34.0)
32 32 - SSZipArchive
33 33 - YYCache
34   - - CNLiveBBASMModule (0.0.8):
  34 + - CNLiveBBASMModule (0.0.10):
35 35 - BBAMNPLib (~> 2.34.0)
36 36 - CNLiveBeeHive
37 37 - CNLiveEnvironment
... ... @@ -494,7 +494,7 @@ SPEC CHECKSUMS:
494 494 AlipaySDK-iOS: 8659cdb4403de7e5f26ad8b699864a9cbe53384c
495 495 BaiduBCE: ca933eadbccac8f8254976c9181ca5f45ded948b
496 496 BBAMNPLib: 070a935319cfd816f29d00c88012a496f7448229
497   - CNLiveBBASMModule: d7fd9bfd6db7c2a1b390356ca79ab4f3f76f6b8c
  497 + CNLiveBBASMModule: 4d1d625a503967002066603a7cb3f831faa99205
498 498 CNLiveBeeHive: 1e105b15b6ccaad546258fcf91231563beb853d4
499 499 CNLiveCommonCategory: 11c736c733ab9c3ea27426d2fafff31a92f0286e
500 500 CNLiveEnvironment: 6af0a2f332b704ffdec67106b4ba044c7f8da371
... ... @@ -523,6 +523,6 @@ SPEC CHECKSUMS:
523 523 Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089
524 524 YYCache: 8105b6638f5e849296c71f331ff83891a4942952
525 525  
526   -PODFILE CHECKSUM: 9cdcda91661964c8692e6f2a81afe7a99b215d88
  526 +PODFILE CHECKSUM: e374a9d58690aca136da7013d46a36df8f29a9ab
527 527  
528 528 COCOAPODS: 1.11.2
... ...