开发者

iphone 4.0 OS. Is it possible to read the file system beyond the application sandbox?

Is it possible to read the file system beyond the application sandbox? Not the area for other applications, but folders like photos, video, music etc.

Would the "Assets Library Framework" help in this case? Can I use a file:/// NSURL etc.? The UIImagePickerController is a facade, it has hidd开发者_C百科en away all the details.


I'm afraid not. For videos and music managed by iPod application, use Media Player Framework to get MPMediaItems. From an MPMediaItem you can get an AVAsset, see AVFoundation framework. You can get the URL of an AVAsset, but it's not a file path.

Similarly for photos and videos in Photo application, you use what you found, ALAssets. Again it doesn't give you the file URL.


If the files you are referring to are images and videos from your phone's photo gallery then it is possible to access them with the help of Assets Library Framework. Available in iOS 4, you can have more access than that provided by UIImagePickerController. For sample code check this out: http://blancer.com/tutorials/i-phone/58725/asset-libraries-and-blocks-in-ios-4/ Its a great tutorial for starting off with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜