Edited removed version from title, but this started with iOS 8.1
I have an app that I've built that will play videos from the users Photos.app. When I install the application on an 8.0.2 device I get back a list of videos from the [PHAsset fetchAssetsWithMediaType:options:] call no problem, but when I install the exact same code on an 8.1 device I get 0 videos returned. Has anyone run into this? Did 8.1 change the way we are supposed to access photos/videos from the Photos.app again?
PHFetchOptions *options = [[PHFetchOptions alloc] init];
PHFetchResult *videos = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeVideo options:options];
Any help would be appreciated.
Update
Modified my code to use PHAssetCollection call to try and fetch the album and I get some success, now on both versions I get 3 of my 6 videos (unfortunately not the same 3 each time).
PHFetchResult *collection = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumSyncedAlbum options:options];
PHFetchResult *videos = [PHAsset fetchKeyAssetsInAssetCollection:collection[0] options:nil];
Edit #2
Ok I just saw my mistake in the above code and I'm leaving it for anyone who does the same stupid thing I did. My videos fetch line is calling for "Key" assets that's why I'm getting only 3.
PHFetchResult *collection = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumSyncedAlbum options:options];
PHFetchResult *videos = [PHAsset fetchAssetsInAssetCollection:collection[0] options:nil];
Self answering so if anyone else runs into this they might have an answer.
So I'm still not sure why my original code didn't work after upgrading to 8.1, but my code in Edit #2 solved the problem by coming at it in another direction.
PHFetchResult *collection = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumSyncedAlbum options:options];
PHFetchResult *videos = [PHAsset fetchAssetsInAssetCollection:collection[0] options:nil];