Reputation: 4523
Also, a link to any Apple docs that describe the usage would be helpful.
Upvotes: 26
Views: 10059
Reputation: 41
You can use URI to store URL of image, audio, video or any other resource. In case, you store images on the device in files, you can use URL of the file path.
Upvotes: 3
Reputation: 70966
In the WWDC 2017 "What's New in Core Data" session, one of the slides indicates:
Why would you need the URI type?
To store a URL.
What is the equivalent Swift object type for a URI property?
The Swift equivalent of NSURL
is URL
.
Would I store a URL in this property?
That is the purpose of the type.
I'm doubtful that I would ever want to store the URI for another managed object in this way, but is it related?
Possible, but probably not a good idea. A relationship would be better. Still, there might be cases where it makes sense to do this.
Upvotes: 40