I\'ve got an array containing ALAsset urls (not full ALAsset objects) So each time I start my application I want to check my array to see if it\'s still up to date...
<
For iOS 8 or later, there is a synchronous method to check if an ALAsset exists.
@import Photos;
if ([PHAsset fetchAssetsWithALAssetURLs:@[assetURL] options:nil].count) {
// exist
}
Swift:
import Photos
if PHAsset.fetchAssetsWithALAssetURLs([assetURL], options: nil).count > 0 {
// exist
}
Swift 3:
import Photos
if PHAsset.fetchAssets(withALAssetURLs: [assetURL], options: nil).count > 0 {
// exist
}