originalFilename
The filename for the asset resource being created.
Declaration
var originalFilename: String? { get set }Discussion
You can use this property to track the original name of the file from which you import an asset resource even if you use the addResource(with:data:options:) method to create a resource from data instead of from a file. After creating the asset, this information is available in the originalFilename property of the corresponding PHAssetResource object.
If you do not specify a value for this property and are using the addResource(with:fileURL:options:) method to create a resource, Photos infers the filename from that method’s fileURL parameter. Otherwise, Photos automatically generates a filename.