Questions tagged [alassetslibrary]

A cocoa-touch framework. An instance of ALAssetsLibrary represents the videos and photos that are under the control of the Photos application.

A cocoa-touch framework. An instance of ALAssetsLibrary represents the videos and photos that are under the control of the Photos application. The library includes those that are in the saved photos album, those coming from iTunes and those that were directly imported into the device. You use it to retrieve the list of all asset groups and to save images and videos into the Saved Photos album.

616 questions
9
votes
1 answer

Saving Video in an Album Created

i have created an album using this code in AppDelegate methode NSString *albumName=@"999Videos"; ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; [library addAssetsGroupAlbumWithName:albumName …
iYousafzai
  • 1,021
  • 1
  • 10
  • 29
9
votes
5 answers

Delete an asset (picture or video) from IPhone in IOS

I am working on an Iphone app and I can enumerate assets using the Assetslibrary and load them into a table view. The user can delete a row (a picture / video) in the app but how do I UPDATE the Iphone photo album directly from my app? Otherwise on…
Paul A.
  • 577
  • 2
  • 11
  • 24
8
votes
1 answer

mach_vm_map(size=) failed (error code=3)

I am trying to save video from album to my document directory. It's working fine for videos less than 1 minute. But when I am trying to save videos more than 1 minute, my app is getting crashed. This is happening only in iPhone, in iPad it's working…
Gill
  • 81
  • 1
  • 5
8
votes
4 answers

How do I create a valid CGImageSourceRef from an ALAssetRepresentation?

I'm trying to use CGImageSourceCreateThumbnailAtIndex to efficiently create a resized version of an image. I have some existing code that does this with images from disk, and now I'm trying to use an image that comes from ALAssetsLibrary. Here's my…
BJ Homer
  • 48,806
  • 11
  • 116
  • 129
8
votes
5 answers

Unable to load image from asset URL

I have a class that stores information about the assets on the phone (images, videos). My class has the ResourceURLString defined as such @property NSURL *ResourceURL; I am setting the property while looping trough the assets on the phone as…
CodeMilian
  • 1,262
  • 2
  • 17
  • 41
8
votes
1 answer

Properly crop an image obtained from the photo library

I've been working on this all day, and have looked at lots of questions here on SO and google, but so far I can't come up with anything quite right. I have taken a photo on an iPad running iOS 5.1.1 and cropped it using the Photos app. I then get a…
lnafziger
  • 25,760
  • 8
  • 60
  • 101
8
votes
4 answers

Has anyone experienced crashes when using ALAssetsLibrary in a background thread?

I have an ios app which has not crashed in this way on ios 5 which is now crashing consistently on ios 6 on startup after 4 or 5 bg/fg cycles. I've traced the issue to my invocations of ALAssetsLibrary enumerateGroupsWithTypes (the app syncs to the…
Jeremy Robin
  • 470
  • 5
  • 12
8
votes
1 answer

UIImagePickerControllerOriginalImage vs original asset data

In the app that I am developing, I am using an image that a user chooses from their photo albums. I need to upload a hi-res version of that photo to my server. I'm using imagePickerController and I've determined that I have 2 options use…
jessieloo
  • 1,759
  • 17
  • 24
8
votes
2 answers

Photo taken with camera does not contain any ALAsset metadata

The weirdest thing is happening. I have an action sheet which gives the user the choice to either take a photo with the camera or choose one from the camera roll. Upon the UIImagePicker returning from selection I use the ALAssetsLibrary to determine…
7
votes
0 answers

Strange writeVideoAtPathToSavedPhotosAlbum behaviour

We have "video-replated" app and using writeVideoAtPathToSavedPhotosAlbum:completionBlock: from ALAssetsLibrary to save videos into camera roll. Most of the time it works very well, but sometimes completionBlock:^(NSURL *assetURL, NSError *error)…
IPv6
  • 405
  • 4
  • 17
7
votes
1 answer

On iOS 8, ​​the ALAssetsLibrary does not show all the "Saved Photos" but only the "Recently added"

In my apps I've always used the library photopicker-ios to show a picker of photos/videos. It has a few unique features not found Apple's implementation UIImagePickerController. It makes use of the ALAssetsLibrary and, specifically,…
Dev
  • 7,027
  • 6
  • 37
  • 65
7
votes
1 answer

How to enumerate all photos on iOS 8 using ALAssetsLibrary

iOS 8 broke lots of apps by removing "Camera Roll" from the ALAssetsLibrary enumerating API. I know I can get all photos using the new Photos framework. But my app has a lot of code depending on ALAsset related classes and I need to keep iOS 7…
Haitao Li
  • 1,695
  • 16
  • 25
7
votes
2 answers

ALAssetsLibrary.enumerateGroupsWithTypes first parameter in Swift

I try to use the enumerateGroupsWithTypes method of the ALAssetsLibrary class but I get an error with the first parameter. The method's prototype : func enumerateGroupsWithTypes(types: ALAssetsGroupType, usingBlock enumerationBlock:…
Morniak
  • 958
  • 1
  • 12
  • 37
7
votes
0 answers

App using UIImagePickerController freezes when selecting "Use Photo" after taking a photo

I'm working on a simple photo and video capture app right now. The app successfully allows the user to take a photo or video on a button press. However, as soon as you finish taking your photo or video, it gives 2 options: "Retake" and "Use Photo"…
user3117509
  • 833
  • 3
  • 14
  • 32
7
votes
1 answer

How do i get only the videos using ALAssetsLibrary

I am trying to get videos present from the photo library from the following piece of code.But i also get images list.How do i get list of all videos? what am i doing wrong? NSMutableArray* assetURLDictionaries = [[NSMutableArray alloc] init]; xy…
user2727923
  • 81
  • 1
  • 4
1 2
3
41 42