Strange asset url suffix on iOS 18 (method PHCachingImageManager().requestAVAsset(forVideo:... )

Hello pals, I investigated strange bug with video url and found out that on iOS 18 method PHCachingImageManager().requestAVAsset(forVideo: returns very weird asset.url with strange suffix "someFileName.MOV#YnBsaXN0MDDRAQJfEBtSZWNvbW1lbmRlZEZvckltbWVyc2l2ZU1vZGUQAAgLKQAAAAAAAAEBAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAr"

example:

PHCachingImageManager().requestAVAsset(forVideo: asset, options: options) { asset, _, _ in if let asset = asset as? AVURLAsset { print(asset.url) // prints - file:///.../data/Media/DCIM/100APPLE/IMG_0011.MOV#YnBsaXN0MDDRAQJfEBtSZWNvbW1lbmRlZEZvckltbWVyc2l2ZU1vZGUQAAgLKQAAAAAAAAEBAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAr } }

on iOS below 18 - it return regular url "...someFile.MOV"

how to correct this bug for iOS 18 users? Please suggest me something, or maybe I'm using this method incorrectly?

easy fix for it: correctedUrl = URL(filePath: asset.url.relativePath)

I am a react-native developer and this url suffix is causing downstream effects for us. See https://github.com/expo/expo/issues/31857

#YnBsaXN0MDDRAQJfEBtSZWNvbW1lbmRlZEZvckltbWVyc2l2ZU1vZGUQAAgLKQAAAAAAAAEBAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAr

I see this exact same string appended to all video urls. The string is the same across devices and apple IDs. Seeing that you have the same string appended to your url is extremely bizarre. This also only happens in iOS 18 for me.

Strange asset url suffix on iOS 18 (method PHCachingImageManager().requestAVAsset(forVideo:... )
 
 
Q