 import CoreLocation
 import AddressBook
 import AVFoundation
+import Photos
 
 public enum PermissionType: String {
     case Contacts = "Contacts"

                    setButtonUnauthorizedStyle(button)
                    button.setTitle("Denied \(type.rawValue)".uppercaseString, forState: UIControlState.Normal)
                }
            }

            let label = permissionLabels[index]

        }
    }

    public func statusPhotos() -> PermissionStatus {
        let status = PHPhotoLibrary.authorizationStatus()
        switch status {
        case .Authorized:
            return .Authorized
        case .Denied, .Restricted:
            return .Unauthorized
        case .NotDetermined:
            return .Unknown
        }
    }
    
    func requestPhotos() {
        if statusPhotos() == .Unknown {
            PHPhotoLibrary.requestAuthorization({ (status) -> Void in
                self.detectAndCallback()
            })
        } else if statusPhotos() == .Unauthorized {
            self.showDeniedAlert(.Photos)
        }
    }
    
    func pollForNotificationChanges() {
        // yuck
        // the alternative is telling developers to call detectAndCallback() in their app delegate
