If I kept a url of a photo image in the Photo Library (ALAsset) in my database for several days, how do I know this photo still exists in the Photo Library by it's NSURL?
I've tried this but it did not work:
// Have already obtained the asset object from ALAssetsLibrary
NSURL *assetURL = [[(ALAsset*)asset defaultRepresentation] url];
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath: [assetURL absoluteString]];
NSLog(@"exists: %d (%@)", exists, [assetURL absoluteString]);
>> exists: 0 (assets-library://asset/asset.PNG?id=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&ext=PNG)
Try this as your requirement. Check it