Marino Faggiana 7 vuotta sitten
vanhempi
commit
940d43902c

+ 4 - 10
iOSClient/AutoUpload/NCAutoUpload.m

@@ -447,7 +447,7 @@
     NSString *autoUploadPath = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:app.activeUrl];
     BOOL useSubFolder = tableAccount.autoUploadCreateSubfolder;
     
-    // Conversion from ALAsset -to-> PHAsset
+    // Conversion from ALAsset [OLD < iOS 8] - to -> PHAsset
     for (ALAsset *asset in newItemsToUpload) {
         
         NSURL *url = [asset valueForProperty:@"ALAssetPropertyAssetURL"];
@@ -585,10 +585,7 @@
         metadataNet = [[NCManageDatabase sharedInstance] getAutoUploadWithSelector:selectorUploadAutoUpload];
         if (metadataNet) {
             
-            PHFetchOptions *fetchOptions = [PHFetchOptions new];
-            fetchOptions.includeAssetSourceTypes = PHAssetSourceTypeNone | PHAssetSourceTypeUserLibrary | PHAssetSourceTypeCloudShared | PHAssetSourceTypeiTunesSynced;
-            
-            result = [PHAsset fetchAssetsWithLocalIdentifiers:@[metadataNet.assetLocalIdentifier] options:fetchOptions];
+            result = [PHAsset fetchAssetsWithLocalIdentifiers:@[metadataNet.assetLocalIdentifier] options:nil];
             
         } else
             break;
@@ -626,11 +623,8 @@
         
             metadataNet =  [[NCManageDatabase sharedInstance] getAutoUploadWithSelector:selectorUploadAutoUploadAll];
             if (metadataNet) {
-            
-                PHFetchOptions *fetchOptions = [PHFetchOptions new];
-                fetchOptions.includeAssetSourceTypes = PHAssetSourceTypeNone | PHAssetSourceTypeUserLibrary | PHAssetSourceTypeCloudShared | PHAssetSourceTypeiTunesSynced;
-            
-                result = [PHAsset fetchAssetsWithLocalIdentifiers:@[metadataNet.assetLocalIdentifier] options:fetchOptions];
+                
+                result = [PHAsset fetchAssetsWithLocalIdentifiers:@[metadataNet.assetLocalIdentifier] options:nil];
         
             } else
                 break;

+ 1 - 4
iOSClient/ManageLocation+ManageAsset/PHAsset+Utility.m

@@ -128,10 +128,7 @@
         return nil;
     }
     
-    PHFetchOptions *fetchOptions = [PHFetchOptions new];
-    fetchOptions.includeAssetSourceTypes = PHAssetSourceTypeNone | PHAssetSourceTypeUserLibrary | PHAssetSourceTypeCloudShared | PHAssetSourceTypeiTunesSynced;
-    
-    PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[localIdentifier] options:fetchOptions];
+    PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[localIdentifier] options:nil];
     
     if(result.count){
         return result[0];

+ 1 - 3
iOSClient/Networking/CCNetworking.m

@@ -1407,10 +1407,8 @@
         if ([metadata.assetLocalIdentifier length] > 0 && [metadata.sessionSelector isEqualToString:selectorUploadAutoUpload]) {
             
             PHAsset *asset;
-            PHFetchOptions *fetchOptions = [PHFetchOptions new];
-            fetchOptions.includeAssetSourceTypes = PHAssetSourceTypeNone | PHAssetSourceTypeUserLibrary | PHAssetSourceTypeCloudShared | PHAssetSourceTypeiTunesSynced;
+            PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[metadata.assetLocalIdentifier] options:nil];
             
-            PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[metadata.assetLocalIdentifier] options:fetchOptions];
             if(result.count){
                 asset = result[0];
                 

+ 1 - 4
iOSClient/Utility/NCRequestAsset.m

@@ -15,10 +15,7 @@
 
 - (void)writeAssetToSandboxFileName:(NSString *)fileName assetLocalIdentifier:(NSString *)assetLocalIdentifier selector:(NSString *)selector selectorPost:(NSString *)selectorPost errorCode:(NSInteger)errorCode metadataNet:(CCMetadataNet *)metadataNet serverUrl:(NSString *)serverUrl activeUrl:(NSString *)activeUrl directoryUser:(NSString *)directoryUser cryptated:(BOOL)cryptated session:(NSString *)session taskStatus:(NSInteger)taskStatus delegate:(id)delegate
 {
-    PHFetchOptions *fetchOptions = [PHFetchOptions new];
-    fetchOptions.includeAssetSourceTypes = PHAssetSourceTypeNone | PHAssetSourceTypeUserLibrary | PHAssetSourceTypeCloudShared | PHAssetSourceTypeiTunesSynced;
-
-    PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[assetLocalIdentifier] options:fetchOptions];
+    PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[assetLocalIdentifier] options:nil];
     
     if (!result.count) {