Human above all, with pathos, weaknesses and grumpy at times. Speak for myself; think out loud. Direct, seemingly hard faced. Urged to fix things. Am fortunate.

Standing on the shoulders of giants


        return sessionManager.upload(multipartFormData: { multipartFormData in
            multipartFormData.append(export.url, withName: "ipa")
            multipartFormData.append(export.manifest.url, withName: "plist")
        }, with: urlRequest, queue: self.queue, encodingCompletion: { result in
            switch result {
            case .success(let upload, _, _):
                upload.validate().responseData(queue: self.queue) { response in
                    switch (response.result, response.result.value) {
                    case (.failure(let error), _):
                        switch error {
                        case let error as AFError where error.isResponseSerializationError:
                                completion(nil, nil)
                        case let error as AFError where error.isResponseValidationError:
                            switch (error.responseCode, {
                            case (401, let data?):
                                if let response = String(data: data, encoding: .utf8), let reason = SubscriptionError.UnauthorisationReason(rawValue: response) {
                                        completion(nil, SubscriptionError.unauthorised(reason:reason))
                                } else {
                                        completion(nil, SubscriptionError.unauthorised(reason: nil))