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 MPMediaItem
s. 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, ALAsset
s. 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.
精彩评论