99#import < Foundation/Foundation.h>
1010
1111#if __IPHONE_OS_VERSION_MIN_REQUIRED
12- #import " QNALAssetFile.h"
13- #import < AssetsLibrary/AssetsLibrary.h>
1412#import < MobileCoreServices/MobileCoreServices.h>
1513#import < UIKit/UIKit.h>
1614
15+ #if !TARGET_OS_MACCATALYST
16+ #import < AssetsLibrary/AssetsLibrary.h>
17+ #import " QNALAssetFile.h"
18+ #endif
19+
1720#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
1821#import " QNPHAssetFile.h"
1922#import < Photos/Photos.h>
2023#endif
2124
22- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90100
25+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
2326#import " QNPHAssetResource.h"
2427#endif
2528
@@ -279,11 +282,13 @@ - (void)putFile:(NSString *)filePath
279282 }
280283}
281284
285+ #if !TARGET_OS_MACCATALYST
282286- (void )putALAsset : (ALAsset *)asset
283287 key : (NSString *)key
284288 token : (NSString *)token
285289 complete : (QNUpCompletionHandler)completionHandler
286290 option : (QNUploadOption *)option {
291+ #if __IPHONE_OS_VERSION_MIN_REQUIRED
287292 if ([QNUploadManager checkAndNotifyError: key token: token input: asset complete: completionHandler]) {
288293 return ;
289294 }
@@ -300,13 +305,16 @@ - (void)putALAsset:(ALAsset *)asset
300305 }
301306 [self putFileInternal: file key: key token: token complete: completionHandler option: option];
302307 }
308+ #endif
303309}
310+ #endif
304311
305312- (void )putPHAsset : (PHAsset *)asset
306313 key : (NSString *)key
307314 token : (NSString *)token
308315 complete : (QNUpCompletionHandler)completionHandler
309316 option : (QNUploadOption *)option {
317+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 90100)
310318 if ([QNUploadManager checkAndNotifyError: key token: token input: asset complete: completionHandler]) {
311319 return ;
312320 }
@@ -323,13 +331,15 @@ - (void)putPHAsset:(PHAsset *)asset
323331 }
324332 [self putFileInternal: file key: key token: token complete: completionHandler option: option];
325333 }
334+ #endif
326335}
327336
328337- (void )putPHAssetResource : (PHAssetResource *)assetResource
329338 key : (NSString *)key
330339 token : (NSString *)token
331340 complete : (QNUpCompletionHandler)completionHandler
332341 option : (QNUploadOption *)option {
342+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000)
333343 if ([QNUploadManager checkAndNotifyError: key token: token input: assetResource complete: completionHandler]) {
334344 return ;
335345 }
@@ -345,6 +355,7 @@ - (void)putPHAssetResource:(PHAssetResource *)assetResource
345355 }
346356 [self putFileInternal: file key: key token: token complete: completionHandler option: option];
347357 }
358+ #endif
348359}
349360
350361@end
0 commit comments