Commit 4254d47c0c77c1a0ffd873278100b20ecf5f81af

Authored by yanglingyu
1 parent f225aa83

重名文件闪退问题解决

CNLiveCServiceModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveCServiceModule' 10 s.name = 'CNLiveCServiceModule'
11 - s.version = '0.0.29' 11 + s.version = '0.0.30'
12 s.summary = '我的服务内容' 12 s.summary = '我的服务内容'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveCServiceModule/Classes/Present/CNLiveServiceHistorySearch.m
@@ -12,13 +12,13 @@ @@ -12,13 +12,13 @@
12 12
13 + (void)saveHistorySearch:(NSMutableArray *)data { 13 + (void)saveHistorySearch:(NSMutableArray *)data {
14 NSString *Path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 14 NSString *Path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
15 - NSString *filePath = [Path stringByAppendingPathComponent:@"ServiceHistorySearch.data"]; 15 + NSString *filePath = [Path stringByAppendingPathComponent:@"ServiceHistorySearchList.data"];
16 [NSKeyedArchiver archiveRootObject:data toFile:filePath]; 16 [NSKeyedArchiver archiveRootObject:data toFile:filePath];
17 } 17 }
18 18
19 + (NSMutableArray *)readHistorySearch { 19 + (NSMutableArray *)readHistorySearch {
20 NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 20 NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
21 - NSString *filePath = [path stringByAppendingPathComponent:@"ServiceHistorySearch.data"]; 21 + NSString *filePath = [path stringByAppendingPathComponent:@"ServiceHistorySearchList.data"];
22 //解档 22 //解档
23 NSMutableArray *data = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath]; 23 NSMutableArray *data = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath];
24 return data; 24 return data;
CNLiveCServiceModule/Classes/View/CNLiveRecommendCell.h renamed to CNLiveCServiceModule/Classes/View/CNLiveRecommendListCell.h
1 // 1 //
2 -// CNLiveRecommendCell.h 2 +// CNLiveRecommendListCell.h
3 // CNLiveCServiceModule 3 // CNLiveCServiceModule
4 // 4 //
5 // Created by CNLive on 2021/11/27. 5 // Created by CNLive on 2021/11/27.
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 12
13 -@interface CNLiveRecommendCell : UICollectionViewCell 13 +@interface CNLiveRecommendListCell : UICollectionViewCell
14 @property (nonatomic, strong) CNliveServicePageModel *model; 14 @property (nonatomic, strong) CNliveServicePageModel *model;
15 15
16 @end 16 @end
CNLiveCServiceModule/Classes/View/CNLiveRecommendCell.m renamed to CNLiveCServiceModule/Classes/View/CNLiveRecommendListCell.m
@@ -5,13 +5,13 @@ @@ -5,13 +5,13 @@
5 // Created by CNLive on 2021/11/27. 5 // Created by CNLive on 2021/11/27.
6 // 6 //
7 7
8 -#import "CNLiveRecommendCell.h" 8 +#import "CNLiveRecommendListCell.h"
9 #import "CNLiveVideoRecommendCell.h" 9 #import "CNLiveVideoRecommendCell.h"
10 -@interface CNLiveRecommendCell()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout> 10 +@interface CNLiveRecommendListCell()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
11 @property (nonatomic, strong) UICollectionView *listCollectionView; 11 @property (nonatomic, strong) UICollectionView *listCollectionView;
12 @end 12 @end
13 static NSString *CNVideoRecommendCellID = @"CNLiveVideoRecommendCell"; 13 static NSString *CNVideoRecommendCellID = @"CNLiveVideoRecommendCell";
14 -@implementation CNLiveRecommendCell 14 +@implementation CNLiveRecommendListCell
15 - (instancetype)initWithFrame:(CGRect)frame 15 - (instancetype)initWithFrame:(CGRect)frame
16 { 16 {
17 self = [super initWithFrame:frame]; 17 self = [super initWithFrame:frame];
CNLiveCServiceModule/Classes/ViewController/CNLiveServiceVC.m
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 #import "CNLiveServiceChinasCell.h" 16 #import "CNLiveServiceChinasCell.h"
17 #import "CNLiveServiceEpiCell.h" 17 #import "CNLiveServiceEpiCell.h"
18 #import "CNLiveServiceLookCell.h" 18 #import "CNLiveServiceLookCell.h"
19 -#import "CNLiveRecommendCell.h" 19 +#import "CNLiveRecommendListCell.h"
20 #import "CNLiveVideoRecommendCell.h" 20 #import "CNLiveVideoRecommendCell.h"
21 #import "CNLiveCycleActiveCell.h" 21 #import "CNLiveCycleActiveCell.h"
22 22
@@ -188,7 +188,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;; @@ -188,7 +188,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;;
188 return cell; 188 return cell;
189 } 189 }
190 else{ 190 else{
191 - CNLiveRecommendCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CNRecommendCellID forIndexPath:indexPath]; 191 + CNLiveRecommendListCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CNRecommendCellID forIndexPath:indexPath];
192 cell.model = model; 192 cell.model = model;
193 return cell; 193 return cell;
194 } 194 }
@@ -274,7 +274,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;; @@ -274,7 +274,7 @@ static NSString *CNGoodsOrVideoheaderID = @&quot;CNLiveGoodsOrVideoHeaderView&quot;;
274 [_listCollectionView registerClass:[CNLiveServiceEpiCell class] forCellWithReuseIdentifier:CNServiceEpiCellID]; 274 [_listCollectionView registerClass:[CNLiveServiceEpiCell class] forCellWithReuseIdentifier:CNServiceEpiCellID];
275 [_listCollectionView registerClass:[CNLiveServiceLookCell class] forCellWithReuseIdentifier:CNServiceLookCellID]; 275 [_listCollectionView registerClass:[CNLiveServiceLookCell class] forCellWithReuseIdentifier:CNServiceLookCellID];
276 [_listCollectionView registerClass:[CNLiveCycleActiveCell class] forCellWithReuseIdentifier:CNCycleActiveCellID]; 276 [_listCollectionView registerClass:[CNLiveCycleActiveCell class] forCellWithReuseIdentifier:CNCycleActiveCellID];
277 - [_listCollectionView registerClass:[CNLiveRecommendCell class] forCellWithReuseIdentifier:CNRecommendCellID]; 277 + [_listCollectionView registerClass:[CNLiveRecommendListCell class] forCellWithReuseIdentifier:CNRecommendCellID];
278 [_listCollectionView registerClass:[CNLiveSearchHeaderView class] forSupplementaryViewOfKind:@"UICollectionElementKindSectionHeader" withReuseIdentifier:CNServiceheaderID]; 278 [_listCollectionView registerClass:[CNLiveSearchHeaderView class] forSupplementaryViewOfKind:@"UICollectionElementKindSectionHeader" withReuseIdentifier:CNServiceheaderID];
279 [_listCollectionView registerClass:[CNLiveGoodsOrVideoHeaderView class] forSupplementaryViewOfKind:@"UICollectionElementKindSectionHeader" withReuseIdentifier:CNGoodsOrVideoheaderID]; 279 [_listCollectionView registerClass:[CNLiveGoodsOrVideoHeaderView class] forSupplementaryViewOfKind:@"UICollectionElementKindSectionHeader" withReuseIdentifier:CNGoodsOrVideoheaderID];
280 _listCollectionView.mj_header = [CNLiveRefreshHeader headerWithRefreshingBlock:^{ 280 _listCollectionView.mj_header = [CNLiveRefreshHeader headerWithRefreshingBlock:^{
Example/CNLiveCServiceModule/main.m
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 int main(int argc, char * argv[]) 13 int main(int argc, char * argv[])
14 { 14 {
15 @autoreleasepool { 15 @autoreleasepool {
16 - [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore]; 16 + [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore];
17 return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class])); 17 return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class]));
18 } 18 }
19 } 19 }