photosframework

Only one iOS permission dialog when modifying multiple photos

这一生的挚爱 提交于 2021-02-08 04:45:55
问题 My app allows a user to multi select images from the camera roll and apply edits to these images. However, it prompts the user for permission for each image edit. Is it possible to only display one permission dialog when editing a user's images? If yes, how do I go about grouping my edits into one permission? Here is a screenshot from my app. I found another app on the app store that is able to mass delete photos with just one permission prompt. Here is a screenshot of that app. Does anyone

Exporting time lapse with AVAssetExportSession results in black video

佐手、 提交于 2020-12-25 01:11:50
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

Exporting time lapse with AVAssetExportSession results in black video

我怕爱的太早我们不能终老 提交于 2020-12-25 01:08:14
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

Exporting time lapse with AVAssetExportSession results in black video

那年仲夏 提交于 2020-12-25 01:02:13
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

Exporting time lapse with AVAssetExportSession results in black video

半腔热情 提交于 2020-12-25 01:01:17
问题 I need to be able to merge videos taken with the time lapse function in the Camera app on iOS and export as a single video. However, even if I try to export a single, unchanged time lapse video to the Photo Library, it saves as a completely black video (with the correct duration). Here is the sample code I wrote to just export a single, unchanged video (most of which is adapted from a Ray Wenderlich tutorial): @IBAction func saveVideo(_ sender: UIBarButtonItem) { // 1 - Early exit if there's

Get an error when trying to get all the photos from PHAssetCollection.fetchAssetCollections

自闭症网瘾萝莉.ら 提交于 2020-08-01 09:23:08
问题 I want to get all the photos of my custom album. but instead what I get is the below error. My Code let collections:PHFetchResult = PHAssetCollection.fetchAssetCollections(with: .album, subtype: .any, options: fetchOptions) Error i get "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)"" Any ideas on how to fix this? 回答1: Based on the comments, I'm not entirely sure what the issue is but I hope this code could provide some assistance. Using .album rather than

How To Paginate when using PHAsset to Fetch User Photo library

自作多情 提交于 2020-01-21 09:16:05
问题 I am asking the same question as here I do not understand how to implement to solution. I have tried the following fileprivate func fetchPhotos(indexSet: IndexSet) { let allPhotos = PHAsset.fetchAssets(with: .image, options: assetsFetchOptions()) DispatchQueue.global(qos: .background).async { allPhotos.enumerateObjects(at: indexSet, options: NSEnumerationOptions.concurrent, using: { (asset, count, stop) in let imageManager = PHImageManager.default() let targetSize = CGSize(width: 200, height:

How to get only images in the camera roll using Photos Framework

杀马特。学长 韩版系。学妹 提交于 2020-01-09 03:21:08
问题 The following code loads images that are also located on iCloud or the streams images. How can we limit the search to only images in the camera roll? var assets = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil) 回答1: After adding the Camera Roll and Photo Stream albums, Apple added the following PHAssetCollectionSubtype types in iOS 8.1: PHAssetCollectionSubtypeAlbumMyPhotoStream (together with PHAssetCollectionTypeAlbum ) - fetches the Photo Stream album.

Delete in PhotoKit: can you skip “Recently Deleted”?

…衆ロ難τιáo~ 提交于 2020-01-06 14:11:43
问题 As of iOS8, when you delete a photo, it goes into a trashcan-analog called "Recently Deleted". This happens when you delete via Photos.app, or via the PhotoKit API (using PHAssetChangeRequest.deleteAssets() ). In Photos.app, you can then go into "Recently Deleted", and really delete that photo. Is there a way to do that in PhotoKit? 回答1: Nope. The only deletion API is deleteAssets . 来源: https://stackoverflow.com/questions/29885416/how-to-remove-photos-from-ios-camera-roll

Crash upon CGImageDestinationFinalize

主宰稳场 提交于 2020-01-02 00:53:13
问题 My app allows users to edit photos using the Photos framework. I am seeing some crash reports, and it appears the crash occurs when generating the output image, but I am not sure where the problem lies. This crash is occurring on multiple hardware devices and multiple versions of iOS 9 including the latest 9.1. The last call my app makes is CGImageDestinationFinalize in order to create the edited image NSData . The crash reports show that calls continue in the CoreImage space before the crash