     }
 }
 
-private func requestPermission(_ container: CKContainer, permission: CKContainer.Application.Permissions, completion: @escaping (CapabilityStatus) -> Void) {
+private func requestPermission(_ container: CKContainer, permission: CKContainer.ApplicationPermissions, completion: @escaping (CapabilityStatus) -> Void) {
     DispatchQueue.main.async {
         container.requestApplicationPermission(permission) { requestStatus, requestError in
             switch requestStatus {

    }
}

private func verifyAccountStatus(_ container: CKContainer, permission: CKContainer.Application.Permissions, shouldRequest: Bool, completion: @escaping (CapabilityStatus) -> Void) {

    container.accountStatus { accountStatus, accountError in


            }
        case .couldNotDetermine:
            completeWithError()
        case .temporarilyUnavailable:
            completeWithError()
        @unknown default:
            completeWithError()
        }
    }
}

private func verifyPermission(_ container: CKContainer, permission: CKContainer.ApplicationPermissions, shouldRequest: Bool, completion: @escaping (CapabilityStatus) -> Void) {
    container.status(forApplicationPermission: permission) { permissionStatus, permissionError in

        func completeWithError() {
