This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"display" | |
"fmt" | |
"log" | |
"os" | |
"os/signal" | |
) | |
//Example of how to use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Photos | |
extension PHAsset { | |
public static func removeAssets(_ paths: [String]){ | |
let assets = PHAsset.assetsByPaths(paths) | |
if (assets.count > 0) { | |
PHPhotoLibrary.shared().performChanges({ | |
PHAssetChangeRequest.deleteAssets(assets as NSArray) | |
}) { (result, error) in | |
// done |