Skip to content

Instantly share code, notes, and snippets.

View grimabe's full-sized avatar
🏠
Working from home

Benjamin Grima grimabe

🏠
Working from home
  • Lyon
View GitHub Profile

Keybase proof

I hereby claim:

  • I am grimabe on github.
  • I am grimabe (https://keybase.io/grimabe) on keybase.
  • I have a public key ASCcqPt-7ke3ezmJo8F84v2mGfBSJLqaxCqmNld8llgNBwo

To claim this, I am signing this object:

import Photos
class AssetsHelper {
class func addAsset(image: UIImage, completion: @escaping (_ identifier: String?) -> Void) {
var identifier: String?
PHPhotoLibrary.shared().performChanges({
let request = PHAssetChangeRequest.creationRequestForAsset(from: image)
identifier = request.placeholderForCreatedAsset?.localIdentifier
}) { success, error in
guard success == true,