         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

        super.init()
    }

    public func isAvailable() -> Bool {
        return true
    }

    public func authorizationStatus(completion: CloudStatus -> Void) {
        verifyAccountStatus(completion: completion)
    }

    public func requestAuthorizationWithCompletion(completion: dispatch_block_t) {
        verifyAccountStatus(true) { _ in
            completion()

    }
}

/**
 A refined CapabilityRegistrarType for Capability.Cloud. This
 protocol defines two functions which the registrar uses to get
 the current authorization status and request access.
*/
public protocol CloudContainerRegistrarType: CapabilityRegistrarType {

    /**
     Provide an instance of Self with the given identifier. This is
     because we need to determined the capability of a specific cloud 
     kit container.
    */
    static func containerWithIdentifier(identifier: String?) -> Self

    /**
     Get the account status, a CKAccountStatus.

     - parameter completionHandler: a completion handler which receives the account status.
     */
    func opr_accountStatusWithCompletionHandler(completionHandler: (CKAccountStatus, NSError?) -> Void)

    /**
     Get the application permission, a CKApplicationPermissions.

     - parameter applicationPermission: the CKApplicationPermissions
     - parameter completionHandler: a CKApplicationPermissionBlock closure
     */
    func opr_statusForApplicationPermission(applicationPermission: CKApplicationPermissions, completionHandler: CKApplicationPermissionBlock)

    /**
     Request the application permission, a CKApplicationPermissions.

     - parameter applicationPermission: the CKApplicationPermissions
     - parameter completionHandler: a CKApplicationPermissionBlock closure
     */
    func opr_requestApplicationPermission(applicationPermission: CKApplicationPermissions, completionHandler: CKApplicationPermissionBlock)
}

/**
The Cloud capability, which generic over CloudContainerRegistrarType.
 
 Framework consumers should not use this directly, but instead
 use Capability.Cloud. So that its usage is like this:

 ```swift

 GetAuthorizationStatus(Capability.Cloud()) { status in
    // check the status etc.
 }
 ```

 - see: Capability.Cloud
*/
public class _CloudCapability<Registrar: CloudContainerRegistrarType>: NSObject, CapabilityType {

    /// - returns: a String, the name of the capability
    public let name: String

    /// - returns: a CKApplicationPermissions, the required permissions for the container
    public let requirement: CKApplicationPermissions

    var hasRequirements: Bool {
