Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将以下调用返回的资产 url 转为设备上的物理路径?
NSURL *assetUrl = [_selectedAsset defaultRepresentation] url];
不可能。(即使你有文件的路径,你的应用程序也无法读取文件,因为沙盒。)
获取资产原始数据的唯一方法是getBytes:fromOffset:length:error:在ALAssetRepresentation.
getBytes:fromOffset:length:error:
ALAssetRepresentation