Files
Jot/Carthage/Checkouts/PromiseKit/Extensions/Photos/Sources/PHPhotoLibrary+Promise.swift
James Griffin be7b6b5881 Add PromiseKit dependency
- Added PromiseKit dependency
2018-11-15 22:12:39 -04:00

25 lines
562 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Photos.PHPhotoLibrary
#if !PMKCocoaPods
import PromiseKit
#endif
/**
To import the `PHPhotoLibrary` category:
use_frameworks!
pod "PromiseKit/Photos"
And then in your sources:
import PromiseKit
*/
extension PHPhotoLibrary {
/**
- Returns: A promise that fulfills with the users authorization
- Note: This promise cannot reject.
*/
public class func requestAuthorization() -> Guarantee<PHAuthorizationStatus> {
return Guarantee(resolver: PHPhotoLibrary.requestAuthorization)
}
}