Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaPicker list albums under ios18 #7888

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
6 changes: 4 additions & 2 deletions Riot/Modules/MediaPicker/MediaPickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,10 @@ - (void)reloadUserLibraryAlbums
MXStrongifyAndReturnIfNil(self);

// List user albums which are not empty
PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];

// Starting from iOS 18, select any subtype albums rather than regular ones else no album is listed (only a few recents photos)
// Maybe because 'smart' albums get a full revamp in iOS 18?
PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil];

NSMutableArray *updatedUserAlbums = [NSMutableArray array];
__block PHAssetCollection *cameraRollAlbum, *videoAlbum;

Expand Down
1 change: 1 addition & 0 deletions changelog.d/mediapicker-list-albums-under-ios18.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MediaPicker list albums under iOS 18
Loading