If you look at PhotoTypes, you will see that Camera Roll is not included in PH, you can get to it
PHFetchResult *result = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeSmartAlbumUserLibrary options:nil]; PHAssetCollection *assetCollection = result.firstObject; NSLog(@"%@", assetCollection.localizedTitle);
In general, how to get everything
PHFetchOptions *options = [[PHFetchOptions alloc] init]; options.wantsIncrementalChangeDetails = YES; options.predicate = [NSPredicate predicateWithFormat:@"mediaType == %d",PHAssetMediaTypeImage]; PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil]; for (PHAssetCollection *sub in albums) { PHFetchResult *fetchResult = [PHAsset fetchAssetsInAssetCollection:sub options:options]; } #pragma mark - PHAssetCollection types typedef NS_ENUM(NSInteger, PHAssetCollectionType) { PHAssetCollectionTypeAlbum = 1, PHAssetCollectionTypeSmartAlbum = 2, PHAssetCollectionTypeMoment = 3, } NS_ENUM_AVAILABLE_IOS(8_0); typedef NS_ENUM(NSInteger, PHAssetCollectionSubtype) {
source share