9
9
#import < Foundation/Foundation.h>
10
10
11
11
#if __IPHONE_OS_VERSION_MIN_REQUIRED
12
- #import " QNALAssetFile.h"
13
- #import < AssetsLibrary/AssetsLibrary.h>
14
12
#import < MobileCoreServices/MobileCoreServices.h>
15
13
#import < UIKit/UIKit.h>
16
14
15
+ #if !TARGET_OS_MACCATALYST
16
+ #import < AssetsLibrary/AssetsLibrary.h>
17
+ #import " QNALAssetFile.h"
18
+ #endif
19
+
17
20
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
18
21
#import " QNPHAssetFile.h"
19
22
#import < Photos/Photos.h>
20
23
#endif
21
24
22
- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90100
25
+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
23
26
#import " QNPHAssetResource.h"
24
27
#endif
25
28
@@ -279,11 +282,13 @@ - (void)putFile:(NSString *)filePath
279
282
}
280
283
}
281
284
285
+ #if !TARGET_OS_MACCATALYST
282
286
- (void )putALAsset : (ALAsset *)asset
283
287
key : (NSString *)key
284
288
token : (NSString *)token
285
289
complete : (QNUpCompletionHandler)completionHandler
286
290
option : (QNUploadOption *)option {
291
+ #if __IPHONE_OS_VERSION_MIN_REQUIRED
287
292
if ([QNUploadManager checkAndNotifyError: key token: token input: asset complete: completionHandler]) {
288
293
return ;
289
294
}
@@ -300,13 +305,16 @@ - (void)putALAsset:(ALAsset *)asset
300
305
}
301
306
[self putFileInternal: file key: key token: token complete: completionHandler option: option];
302
307
}
308
+ #endif
303
309
}
310
+ #endif
304
311
305
312
- (void )putPHAsset : (PHAsset *)asset
306
313
key : (NSString *)key
307
314
token : (NSString *)token
308
315
complete : (QNUpCompletionHandler)completionHandler
309
316
option : (QNUploadOption *)option {
317
+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 90100)
310
318
if ([QNUploadManager checkAndNotifyError: key token: token input: asset complete: completionHandler]) {
311
319
return ;
312
320
}
@@ -323,13 +331,15 @@ - (void)putPHAsset:(PHAsset *)asset
323
331
}
324
332
[self putFileInternal: file key: key token: token complete: completionHandler option: option];
325
333
}
334
+ #endif
326
335
}
327
336
328
337
- (void )putPHAssetResource : (PHAssetResource *)assetResource
329
338
key : (NSString *)key
330
339
token : (NSString *)token
331
340
complete : (QNUpCompletionHandler)completionHandler
332
341
option : (QNUploadOption *)option {
342
+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000)
333
343
if ([QNUploadManager checkAndNotifyError: key token: token input: assetResource complete: completionHandler]) {
334
344
return ;
335
345
}
@@ -345,6 +355,7 @@ - (void)putPHAssetResource:(PHAssetResource *)assetResource
345
355
}
346
356
[self putFileInternal: file key: key token: token complete: completionHandler option: option];
347
357
}
358
+ #endif
348
359
}
349
360
350
361
@end
0 commit comments