assetslibrary

Assets Library Framework not working correctly on 4.0 and 4.2

谁都会走 提交于 2019-12-22 01:08:08
问题 I have tried to implement the Asset Library and create a Custom Image Picker. Specifically, I am trying to run the code given here: http://icodeblog.com/2010/10/07/cloning-uiimagepickercontroller-using-the-assets-library-framework/ The code runs perfectly well in Simulator 4.1 but when I try 4.0 or 4.2 it gets stuck on the Loading screen and it gives me the following comment on the GDB: 2010-11-16 16:37:27.514 ELCImagePickerDemo[49819:6b03] A problem occured It's from this line in the code:

ALAssetsLibrary delete ALAssetsGroup / ALAsset

安稳与你 提交于 2019-12-17 19:48:14
问题 I have created "photos album" from my App, using IOS AssetsLibrary. Reading ALAssetsLibrary,ALAssetsGroup and ALAsset documentations, i have seen methods to "addAsset","addAssetsGroupAlbumWithName". Is there a way to delete PROGRAMMATICALLY my ALAssetsGroup and ALAsset. (the property 'editable' suppose to be TRUE because i create this data). 回答1: This is not possible using any documented API. Only the photos app can delete Albums. If you want this feature to be added to iOS, I would fill a

ALAssetPropertyLocation not working on any iOS 4.0+ on 3gs iPhones but working perfectly on iPhone4

匆匆过客 提交于 2019-12-12 10:29:23
问题 I've got an app with location services ENABLED (from settings etc), and I'm reading all the photos from my device using ALAssetsLibrary. It works perfectly on iPhone4 iOS 4.2.1, but the same code and the same assets DONT WORK on any 3gs any iOS (from 4.0 to 4.2.1). The problem is that it retrieves always an invalid CLLocation on the 3gs. Even on the same picture (copied across both devices) on the iPhone4 returns a valid CLLocation, on the 3gs it returns invalid! The picture image itself it's

When can I use Photos Framework and iCloud Photo Library?

感情迁移 提交于 2019-12-12 06:16:30
问题 I want to provide my users a photo picker which displays all their images similarly to the Photos app. Currently I can use two frameworks, the old Assets Library and the new Photos Library frameworks. Is there any recommendation how should I choose between these two? The documentation states: In iOS 8.0 and later, use the Photos framework instead of the Assets Library framework. The Photos framework provides more features and better performance for working with a user’s photo library. But as

How to receive ALAssetsLibraryChangedNotification in iOS 4 while in background

你。 提交于 2019-12-11 03:49:59
问题 I would like to register my iOS 4 app as an observer for ALAssetsLibraryChangedNotification and receive notifications when changes happen to the camera roll and photo library. The most obvious scenario is: 1) My app enumerates photo contents using ALAssetsLibrary. 2) Leave my app (goes into background) and launch the camera app. 3) Take a picture. 4) Leave the camera app and return to my app. I was hoping the ALAssetsLibraryChangedNotification would be delivered when my app returned to the

The execution of block is always delayed

做~自己de王妃 提交于 2019-12-06 11:31:51
问题 I'm pretty new to IOS. I want to get all pictures on a device in viewDidLoad . but the block is always executed after I called NSLog(@"%d", photos.count) in the code as follows. How to handle such a case? __block NSMutableArray* photos = [[[NSMutableArray alloc] init] retain]; ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; void (^assertsEnumerator)(ALAsset *, NSUInteger , BOOL *) = ^(ALAsset *result, NSUInteger index, BOOL *stop) { if(result) { NSLog(@"Assert name : %@", [result

Can't edit photo metadata using AssetsLibrary in iOS 8.3 (worked in 8.2)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 02:38:24
问题 My app takes pictures, saves them to the camera roll, and allows the modification of the EXIF metadata. I use the AssetsLibrary to save and modify the photo (I can't use the new PhotoKit api because I need to modify the underlying EXIF, plus it's a legacy app and would require a lot of refactoring to change it). I am using Xcode 6.3.1, with the iOS 8.3 SDK, deployment target of 6.1. In iOS 8.2, all this worked. In iOS 8.3, the editing of the metadata fails. The app has permission in the

Can't edit photo metadata using AssetsLibrary in iOS 8.3 (worked in 8.2)

£可爱£侵袭症+ 提交于 2019-12-03 20:59:37
My app takes pictures, saves them to the camera roll, and allows the modification of the EXIF metadata. I use the AssetsLibrary to save and modify the photo (I can't use the new PhotoKit api because I need to modify the underlying EXIF, plus it's a legacy app and would require a lot of refactoring to change it). I am using Xcode 6.3.1, with the iOS 8.3 SDK, deployment target of 6.1. In iOS 8.2, all this worked. In iOS 8.3, the editing of the metadata fails. The app has permission in the Privacy settings to access Photos. When a user modifies the photos, and the app tries to rewrite the photo,

Crash being reported for ALAssetRepresentation metadata method

倾然丶 夕夏残阳落幕 提交于 2019-12-03 17:22:47
问题 I have some code that wraps an ALAsset object that is retrieved from enumerating the assets in an ALAssetLibrary. I'm getting reports of users encountering crashes with the part of the wrapper object that asks the ALAsset it contains for metadata. The code that crashes is in this wrapper class and it simply asks for its ALAsset's metadata like so: [[myAlAsset defaultRepresentation] metadata]; Here is a partial stack trace that is representative of the crashes I'm seeing: 0 CoreFoundation

Crash being reported for ALAssetRepresentation metadata method

放肆的年华 提交于 2019-12-03 05:37:38
I have some code that wraps an ALAsset object that is retrieved from enumerating the assets in an ALAssetLibrary. I'm getting reports of users encountering crashes with the part of the wrapper object that asks the ALAsset it contains for metadata. The code that crashes is in this wrapper class and it simply asks for its ALAsset's metadata like so: [[myAlAsset defaultRepresentation] metadata]; Here is a partial stack trace that is representative of the crashes I'm seeing: 0 CoreFoundation CFDataGetBytePtr + 5 1 PhotoLibraryServices __46-[PLManagedAsset adjustmentsXMPRepresentation]_block_invoke