how to identify the iCloud media?

Hi,


Is there any way to check the media is physically available on device. In other words how to identify the iCloud media using swift or objective c.

I have tried to access PHAssetSourceType property but seems there is some issue with that.

let assetType = (self.assets?[indexPath.row])! as PHAsset

// let sourceType = assetType.sourceType as PHAssetSourceType



if assetType.sourceType == .typeCloudShared {

(cell as! FNSCameraRollCollectionViewCell).iCloudImage.isHidden = false

}


I am getting below result :

PHAssetSourceType(rawValue: 1)


My objective is to customize the camera roll and show the icon on iCloud media.


Thank you

Nitesh