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.

619 questions
15
votes
2 answers

How to get a photo's original filename in iOS?

I'm currently developing an iPad app where a user will enter a photo filename in a text field (as part of field notes), then later they will import their photos to the iPad's photo library. The app will access the library using ALAssetsLibrary and…
bwizzy
  • 1,571
  • 2
  • 17
  • 34
14
votes
2 answers

Get URL of a newly created asset, iOS 9 style

ALAssetsLibrary is deprecated these days but practically all examples on SO are still making use of it. For my objective, I need to know the URL of the video that was added to the Photo Library so I could share a video to the Instagram app (that's…
Desmond Hume
  • 6,732
  • 13
  • 57
  • 104
14
votes
5 answers

iOS save photo in an app specific album

I'm creating an iOS 5 app. I want to save a photo to the device. I want to save the photo to an album specific to my app, so I need to create the album, and then save photos to the album. I know how to create the album: ALAssetsLibrary *library =…
Todd Davies
  • 5,354
  • 7
  • 44
  • 69
13
votes
1 answer

How to use PHPhotoLibrary like ALAssetsLibrary

For iOS9, ALAssetsLibrary is deprecated. So how to change it as PHPPhotoLibrary instead of ALAssets? if (RecordedSuccessfully && recording == NO) { //----- RECORDED SUCESSFULLY ----- NSLog(@"didFinishRecordingToOutputFileAtURL - success"); …
dicle
  • 932
  • 1
  • 8
  • 35
13
votes
2 answers

Generating custom thumbnail from ALAssetRepresentation

My main problem is i need to obtain a thumbnail for an ALAsset object. I tried a lot of solutions and searched stack overflow for days, all the solutions i found are not working for me due to these constraint: I can't use the default thumbnail…
Scakko
  • 548
  • 6
  • 17
12
votes
6 answers

Getting video from ALAsset

Using the new asset library framework available in iOS 4 i see that I can get the url for a given video using the UIImagePickerControllerReferenceURL. The url returned is in the following…
Rich Dominelli
  • 905
  • 1
  • 7
  • 18
11
votes
4 answers

How to check if an ALAsset still exists using a URL

I've got an array containing ALAsset urls (not full ALAsset objects) So each time I start my application I want to check my array to see if it's still up to date... So I tried NSData *assetData = [[NSData alloc]…
Mathieu
  • 1,165
  • 4
  • 18
  • 34
10
votes
4 answers

Save generated GIF to camera roll?

Thanks for reading. I've created a GIF using methods from this question: Create and and export an animated gif via iOS? I'm trying to use the only method that appears to be able to save non JPG/PNG images to the camera roll, ALAssetLibrary's…
Rob Caraway
  • 3,467
  • 3
  • 24
  • 36
10
votes
2 answers

ALAssetPrivate past the lifetime of its owning ALAssetsLibrary

I am trying to get all the images that are in the photos.app and display them in a UICollectionView. I have this code to retrieve the images: ALAssetsLibrary *al = [ViewController defaultAssetsLibrary]; ALAssetsGroupEnumerationResultsBlock…
BalestraPatrick
  • 9,034
  • 4
  • 27
  • 43
10
votes
1 answer

ALAssetsLibrary - crash after receiving ALAssetsLibraryChangedNotification

Part of my app has a photo browser, somewhat similar to Apple's Photos app, with an initial view controller to browse photo thumbnails and a detail view that's shown when you tap on a photo. I'm using ALAssetsLibrary to access photos, and I pass an…
Jim Rhoades
  • 3,168
  • 3
  • 31
  • 50
9
votes
2 answers

Access cropped or edited images using ALAssetsLibrary

I have an ipad app which takes images from Photos application using ALAssetsLibrary and then uploads them to web server. So far everything is working fine. Now if i go to the photos application and edit an image (say crop) and upload, the original…
mithuntnt
  • 497
  • 1
  • 5
  • 16
9
votes
4 answers

Access a single image with ALAssetsLibrary

Allow me to preface this by saying this is my first time using the ALAssetsLibrary. I need to access the most recent photo in the user's saved photo gallery. It seems that to do this, I have to create an ALAssetsLibrary instance and iterate over…
Jacob
  • 926
  • 1
  • 14
  • 25
9
votes
2 answers

PHAsset returned from fetchAssetsWithALAssetURLs: is always nil when choosing a photo from the "My Photo Stream" album using UIImagePickerController

I am using a UIImagePickerController to let the user choose a photo or video to share in the app. When the user chooses a media item in their Library, I execute this code in one of the UIImagePickerController's delegate methods: -…
9
votes
4 answers

NSURLSession and stream upload in background

I have some problems with using NSURLSession to upload photos from Asset Library to the server. At first NSURLSession doesn't support streaming upload. I got an exception when trying to using that: @property (nonatomic, strong) NSURLSession…
gN0Me
  • 445
  • 1
  • 5
  • 17
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 …
ihy
  • 1,041
  • 10
  • 29
1
2
3
41 42