Sunday, 29 September 2013

What is the difference between Asset Library and Media Library on iOS?

What is the difference between Asset Library and Media Library on iOS?

I have found this code snippet. It scans the Asset Library and the Media
Library for videos.
To my understanding there is app data in Documents directory of an app.
And there is camera roll. I think Asset Library refers to Camera Roll.
So is Media Library for videos that are stored inside the apps Documents
directory?
- (void)buildMediaLibrary
{
__unsafe_unretained __block VideoLibrary *weakSelf = (VideoLibrary
*)self;
dispatch_group_async(self.libraryGroup, self.libraryQueue, ^{
NSLog(@"started building media library...");
// Search for video content in the Media Library
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000
NSNumber *videoTypeNum = [NSNumber
numberWithInteger:MPMediaTypeAnyVideo];
#else
NSNumber *videoTypeNum = [NSNumber
numberWithInteger:(MPMediaTypeAny ^ MPMediaTypeAnyAudio)];

No comments:

Post a Comment