---
title: "How to get unique id of ALAsset for identification in iOS?"  
description: "How to get unique id of ALAsset for identification in iOS?"  
author: "marcel ethan"  
published: 2016-01-14  
updated: 2016-01-15  
canonical: https://www.mindstick.com/forum/33873/how-to-get-unique-id-of-alasset-for-identification-in-ios  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# How to get unique id of ALAsset for identification in iOS?

I have created a **Image Gallary** and getting images from Photo Library. I want to [duplicate](https://www.mindstick.com/forum/160911/sql-query-to-find-duplicate-records-in-a-table-in-sql-server) an image in our photo [gallery](https://answers.mindstick.com/qa/31021/how-do-i-style-a-gallery-wall), but in [future](https://yourviews.mindstick.com/audio/1195/ayurveda-ancient-wisdom-for-modern-wellness-and-future-health) can I [check if](https://www.mindstick.com/forum/12878/how-to-check-if-an-asp-dot-net-file-upload-control-has-a-file-in-jquery) I [already](https://yourviews.mindstick.com/view/88453/the-hidden-ways-ai-is-already-controlling-your-daily-life) imported that image.\
Can any one tell me that- Is **ALAsset** provides any [unique id](https://www.mindstick.com/forum/23131/windows-phone-8-1-device-unique-id) for each images, because I want to [compare two](https://www.mindstick.com/forum/34476/specific-cast-is-not-valid-in-linq-query-when-compare-two-tables) images.\
[Please suggest](https://answers.mindstick.com/qa/43506/please-suggest-the-bathing-date-at-kumbh) me any solution.\
Thanks for advance.

## Replies

### Reply by Tarun Kumar

I have also faced the same situation so, I tell you some important points about that:

- whenever we insert a photo into the photo library, photo library create a unique URL for every photos that we insert. that means if we insert any image and delete that image and after we insert that image again, even if it is the same image, photo library provide a new unique URL.\
- always remember one thing that there is no straight forward way to find the image is duplicate of previous images of not.\
- photo library is not provided the facility to delete the image or asset programmatically from the ipone/ipad photo library.


---

Original Source: https://www.mindstick.com/forum/33873/how-to-get-unique-id-of-alasset-for-identification-in-ios

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
