The following code loads images that are also located on iCloud or the streams images. How can we limit the search to only images in the camera roll?
var assets = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil)
After adding the Camera Roll and Photo Stream albums, Apple added the following PHAssetCollectionSubtype
types in iOS 8.1:
PHAssetCollectionSubtypeAlbumMyPhotoStream
(together with PHAssetCollectionTypeAlbum
) - fetches the Photo Stream album.
PHAssetCollectionSubtypeSmartAlbumUserLibrary
(together with PHAssetCollectionTypeSmartAlbum
) - fetches the Camera Roll album.
Haven't tested if this is backward-compatible with iOS 8.0.x though.