Questions tagged [phphotolibrary]

The PHPhotoLibrary framework provides interfaces for viewing, editing and creating assets and collections managed by the IOS Photos app.

196 questions
0
votes
0 answers

How to access photos from photolibrary clicked by camera only swift as camera roll provide images download from internet and WhatsApp images also

Hi i have used following api to fetch camera roll images. but i need to filter images clicked by camera device but not downloaded from internet. smartAlbums = PHAssetCollection.fetchAssetCollections(with: .album, subtype: .smartAlbumUserLibrary,…
technoAndroid
  • 31
  • 2
  • 7
0
votes
1 answer

Unable to show video in camera roll after trimming

I'm developing video player in which I have trimming functionality. I am using ABVideoRangeSlider for that. Whenever I try to trim and save video I'm getting Error Domain=NSCocoaErrorDomain Code=-1 "(null)" this error. Here is my code snippet …
pravin nagargoje
  • 70
  • 1
  • 1
  • 9
0
votes
1 answer

iOS: Switch PHPhotoLibrary permissions using settings

I'm checking for permissions to the camera roll: -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:YES]; PHAuthorizationStatus status = [PHPhotoLibrary authorizationStatus]; if (status != PHAuthorizationStatusNotDetermined) { …
user2924482
  • 8,380
  • 23
  • 89
  • 173
0
votes
1 answer

Save Image metadata PHPhotoLibrary vs ALAssetsLibrary

When using ALAssetsLibrary, I used to save image to photo library with proper exif using the code below: NSInteger orientation = 2;// Or whatever NSData *jpegData = [AVCaptureStillImageOutput…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
0
votes
1 answer

How to get ref url from PHPhotoLibrary in ioS?

I am capturing image with camera. After capturing i want to get the url so that i can get the image name.I am using below code for this. PHObjectPlaceholder *assetholder; PHPhotoLibrary *objPhoto = [PHPhotoLibrary sharedPhotoLibrary]; …
iOSGuy
  • 171
  • 1
  • 14
0
votes
1 answer

Best Way utilize PHPhotoLibrary for display Camera Roll image in UICollectionView with custom Cell

Hello everyone I have a problem with my app ... Within my View Controller hp a CollectionView with a custom cell that should return all of the photos in the Camera Roll section of the app pictures of my iphone. Now I've done all the steps to show…
0
votes
0 answers

iOS photo library: can unique identifier reuse after asset delete?

I have an app the check changes in the Photo library. My app uses the PHAsset local identifier to follow any changes that happened with this asset. My question is if the user delete an image from the photo library, can the photo app use this…
Idan Aviv
  • 1,253
  • 2
  • 13
  • 23
0
votes
0 answers

Creating an image from NSData and saving it using PHPhotoLibrary

I am tring to create an image using the NSData collected from Bluetooth. The data is saved in NSData variable recdata which is then converted to image using imageWithData. I am trying to save this image to the Photo library using the code below. But…
bob
  • 33
  • 5
0
votes
0 answers

iOS: App crash when trying to save image using PHPhotoLibrary

I'm trying to save photo using PHPhotoLibrary. That photo I saved in the app document folder as temp file. Below is my store photo code, running background using NSOperationQueue - (void)_storePhotoToAblum:(NSDictionary *)photoDic { NSString…
Xin
  • 47
  • 7
0
votes
1 answer

Copying file from temp url to documents directory always throws. NSURLSessionDownloadTask

I'm downloading a file using NSURLSessionDownloadTask which is working great. As I get my image or video file into a temp directory. But I need to move it to a permanent URL in order to put it into photos library. I'm using NSFileManager 's…
NSGangster
  • 2,397
  • 12
  • 22
0
votes
0 answers

Swift UICollectionView FlowLayout with PhotoFramework assets

I have a UICollectionViewController that implemented with PHCachingImageManager that caches all the photos in the Camera Roll. This works correctly with normal collection view layout, even with around 2000 photos. However if I implement…
sunfffd
  • 141
  • 6
0
votes
1 answer

Error code in saving images by PHPhotoLibrary

My code uses ALAssetsLibrary to get/save images on iPhone so far. And Currently I'm changing over from ALAssetsLibrary to PHPhotoLibrary. In the migration I looked for error codes such as, ALAssetsLibraryWriteBusyError and…
M.Masa
  • 532
  • 4
  • 20
0
votes
1 answer

How to get the date of a photo using PHPhotoLibrary

I'm trying to convert from ALAssetsLibrary to PHPhotoLibrary since it is deprecated. I need to grab the date from a chosen photo from the photo library but can't figure out the right way. Here is how I'm currently doing it. mediaUrl =…
Jeremiah
  • 1,471
  • 1
  • 13
  • 22
0
votes
1 answer

How to save the live/animated wallpaper

I am making an app of live photo/wallpaper. I am downloading image and .mov file from server. Now I am stuck to saving these files in document directory. How can I store the live wallpaper in document directory. Is anyone have idea about this please…
Muhammad Salman
  • 543
  • 4
  • 22
0
votes
1 answer

How do I write video/image to saved photos album using PHPhotoLibrary?

Hi all I'm using ALAssetsLibrary to write videos/images to the album. But XCode is telling me that ALAssetsLibrary is deprecated and I need to use PHPhotoLibrary, which is all well and good but there are no examples or documentation of how to make…
makthrow
  • 129
  • 1
  • 16