         self.error = error
     }
 
+    /**
+     Determine whether the application permissions have been met.
+     This method takes into account, any errors received from CloudKit,
+     the account status, application permission status, and the required
+     application permissions.
+    */
     public func isRequirementMet(requirement: CKApplicationPermissions) -> Bool {
         if let _ = error {
             return false

    }
}

public protocol CloudContainerRegistrarType: CapabilityRegistrarType {

    static func containerWithIdentifier(identifier: String?) -> Self

    func opr_accountStatusWithCompletionHandler(completionHandler: (CKAccountStatus, NSError?) -> Void)
    func opr_statusForApplicationPermission(applicationPermission: CKApplicationPermissions, completionHandler: CKApplicationPermissionBlock)
    func opr_requestApplicationPermission(applicationPermission: CKApplicationPermissions, completionHandler: CKApplicationPermissionBlock)
}

public class _CloudCapability<Registrar: CloudContainerRegistrarType>: NSObject, CapabilityType {

    public let name: String
    public let requirement: CKApplicationPermissions

    var hasRequirements: Bool {

        super.init()
    }

    /// - returns: true, CloudKit is always available
    public func isAvailable() -> Bool {
        return true
    }

    /**
     Get the current authorization status of CloudKit from the Registrar.
     - parameter completion: a CloudStatus -> Void closure.
     */
    public func authorizationStatus(completion: CloudStatus -> Void) {
        verifyAccountStatus(completion: completion)
    }

    /**
     Requests authorization to the Cloud Kit container from the Registrar.
     - parameter completion: a dispatch_block_t
     */
    public func requestAuthorizationWithCompletion(completion: dispatch_block_t) {
        verifyAccountStatus(true) { _ in
            completion()
