Post

Replies

Boosts

Views

Activity

Issue with AVAsset access in iOS 18 beta
NSString *filePath = @"/var/mobile/Media/DCIM/100APPLE/IMG_0800.MP4"; NSURL *fileURL = [NSURL fileURLWithPath:filePath]; AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:fileURL options:nil]; Before iOS 18, you could access AVAsset using the method mentioned above, but starting from the iOS 18 beta version, the following error appears Error Domain=NSCocoaErrorDomain Code=257 "未能打开文件“IMG_0800.MP4”,因为你没有查看它的权限。" UserInfo={NSURL=file:///var/mobile/Media/DCIM/100APPLE/IMG_0800.MP4, AVErrorFailedDependenciesKey=( "assetProperty_AssetType" ), NSUnderlyingError=0x30c497f60 {Error Domain=NSOSStatusErrorDomain Code=-12203 "(null)"}}
7
0
1.3k
Jul ’24