Commit 6d533a7d59659bc7caa189ff8f6d07996f04f29c
1 parent
0caac569
提交0.0.4
Showing
3 changed files
with
12 additions
and
6 deletions
CNLiveICloudPicker/Classes/CNICloudManager.h
| ... | ... | @@ -35,10 +35,11 @@ NS_ASSUME_NONNULL_BEGIN |
| 35 | 35 | |
| 36 | 36 | @param url 文件路径 |
| 37 | 37 | @param maxSize 保存的最大尺寸 为 nil 忽略 |
| 38 | - @param conversationId 群聊为群 ID, 单聊为好友ID (即 会话ID) | |
| 38 | + @param path 群聊为群 ID, 单聊为好友ID (即 会话ID)路径 | |
| 39 | + ([CNTools getChatFilesPathByUserId:conversationId]) | |
| 39 | 40 | @param callBackContent 保存h的路径 url,是否保存成功,保存失败的描述 |
| 40 | 41 | */ |
| 41 | -+ (void)saveWithDocumentURL:(NSURL *)url maxSize:(float)maxSize conversationId:(NSString *)conversationId callBackContent:(void(^)(CNICloudDocumentModel *model, BOOL success, NSString * msg,NSInteger code))callBackContent; | |
| 42 | ++ (void)saveWithDocumentURL:(NSURL *)url maxSize:(float)maxSize path:(NSString *)path callBackContent:(void(^)(CNICloudDocumentModel *model, BOOL success, NSString * msg,NSInteger code))callBackContent; | |
| 42 | 43 | |
| 43 | 44 | /** |
| 44 | 45 | 文件是否在 iCloudBox 存在 | ... | ... |
CNLiveICloudPicker/Classes/CNICloudManager.m
| ... | ... | @@ -84,11 +84,12 @@ |
| 84 | 84 | |
| 85 | 85 | @param url 文件路径 |
| 86 | 86 | @param maxSize 保存的最大尺寸 为 nil 忽略 |
| 87 | - @param conversationId 群聊为群 ID, 单聊为好友ID (即 会话ID) | |
| 87 | + @param path 群聊为群 ID, 单聊为好友ID (即 会话ID)路径 | |
| 88 | + ([CNTools getChatFilesPathByUserId:conversationId]) | |
| 88 | 89 | @param callBackContent 保存h的路径 url,是否保存成功,保存失败的描述 |
| 89 | 90 | */ |
| 90 | 91 | |
| 91 | -+ (void)saveWithDocumentURL:(NSURL *)url maxSize:(float)maxSize conversationId:(NSString *)conversationId callBackContent:(void(^)(CNICloudDocumentModel *model, BOOL success, NSString * msg, NSInteger code))callBackContent { | |
| 92 | ++ (void)saveWithDocumentURL:(NSURL *)url maxSize:(float)maxSize path:(NSString *)path callBackContent:(void(^)(CNICloudDocumentModel *model, BOOL success, NSString * msg, NSInteger code))callBackContent { | |
| 92 | 93 | |
| 93 | 94 | if (![CNICloudManager iCloudEnable]) { |
| 94 | 95 | callBackContent(nil, false, @"请在设置->AppleID、iCloud->iCloud中打开访问权限",code101); |
| ... | ... | @@ -123,8 +124,7 @@ |
| 123 | 124 | |
| 124 | 125 | if (data) { |
| 125 | 126 | |
| 126 | - | |
| 127 | - NSString *dataPath = [[CNTools getChatFilesPathByUserId:conversationId] stringByAppendingPathComponent:fileName]; | |
| 127 | + NSString *dataPath = [[NSString stringWithFormat:@"%@",path] stringByAppendingPathComponent:fileName]; | |
| 128 | 128 | NSURL *writeUrl = [[NSURL alloc]initFileURLWithPath:dataPath]; |
| 129 | 129 | [CNICloudFileHelper createDirectoryAtPath:kICloudBoxPath]; |
| 130 | 130 | ... | ... |
Example/CNLiveICloudPicker.xcodeproj/project.pbxproj
| ... | ... | @@ -247,6 +247,9 @@ |
| 247 | 247 | LastUpgradeCheck = 0720; |
| 248 | 248 | ORGANIZATIONNAME = jyyjkt; |
| 249 | 249 | TargetAttributes = { |
| 250 | + 6003F589195388D20070C39A = { | |
| 251 | + DevelopmentTeam = 94X49GG3ZW; | |
| 252 | + }; | |
| 250 | 253 | 6003F5AD195388D20070C39A = { |
| 251 | 254 | TestTargetID = 6003F589195388D20070C39A; |
| 252 | 255 | }; |
| ... | ... | @@ -497,6 +500,7 @@ |
| 497 | 500 | baseConfigurationReference = F694DA87FF836C34F6E0F397 /* Pods-CNLiveICloudPicker_Example.debug.xcconfig */; |
| 498 | 501 | buildSettings = { |
| 499 | 502 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 503 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | |
| 500 | 504 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
| 501 | 505 | GCC_PREFIX_HEADER = "CNLiveICloudPicker/CNLiveICloudPicker-Prefix.pch"; |
| 502 | 506 | INFOPLIST_FILE = "CNLiveICloudPicker/CNLiveICloudPicker-Info.plist"; |
| ... | ... | @@ -512,6 +516,7 @@ |
| 512 | 516 | baseConfigurationReference = 44EF11549099F9444C7E25B6 /* Pods-CNLiveICloudPicker_Example.release.xcconfig */; |
| 513 | 517 | buildSettings = { |
| 514 | 518 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 519 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | |
| 515 | 520 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
| 516 | 521 | GCC_PREFIX_HEADER = "CNLiveICloudPicker/CNLiveICloudPicker-Prefix.pch"; |
| 517 | 522 | INFOPLIST_FILE = "CNLiveICloudPicker/CNLiveICloudPicker-Info.plist"; | ... | ... |