diff --git a/Braintree.podspec b/Braintree.podspec index 3f343e8649..b9b2ff4d50 100644 --- a/Braintree.podspec +++ b/Braintree.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Braintree" - s.version = "6.23.0" + s.version = "6.23.1" s.summary = "Braintree iOS SDK: Helps you accept card and alternative payments in your iOS app." s.description = <<-DESC Braintree is a full-stack payments platform for developers diff --git a/Demo/Application/Supporting Files/Braintree-Demo-Info.plist b/Demo/Application/Supporting Files/Braintree-Demo-Info.plist index 2ddcbf97ad..ccdb1c29ef 100644 --- a/Demo/Application/Supporting Files/Braintree-Demo-Info.plist +++ b/Demo/Application/Supporting Files/Braintree-Demo-Info.plist @@ -41,7 +41,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 6.23.0 + 6.23.1 CFBundleURLTypes @@ -56,7 +56,7 @@ CFBundleVersion - 6.23.0 + 6.23.1 LSApplicationQueriesSchemes com.braintreepayments.Demo.payments diff --git a/Sources/BraintreeCore/BTAPIClient.swift b/Sources/BraintreeCore/BTAPIClient.swift index e58a578af8..b97378471a 100644 --- a/Sources/BraintreeCore/BTAPIClient.swift +++ b/Sources/BraintreeCore/BTAPIClient.swift @@ -394,7 +394,12 @@ import Foundation // MARK: BTAPITimingDelegate conformance func fetchAPITiming(path: String, connectionStartTime: Int?, requestStartTime: Int?, startTime: Int, endTime: Int) { - let cleanedPath = path.replacingOccurrences(of: "/merchants/([A-Za-z0-9]+)/client_api", with: "", options: .regularExpression) + var cleanedPath = path.replacingOccurrences(of: "/merchants/([A-Za-z0-9]+)/client_api", with: "", options: .regularExpression) + cleanedPath = cleanedPath.replacingOccurrences( + of: "payment_methods/.*/three_d_secure", + with: "payment_methods/three_d_secure", + options: .regularExpression + ) if cleanedPath != "/v1/tracking/batch/events" { analyticsService?.sendAnalyticsEvent(FPTIBatchData.Event( diff --git a/Sources/BraintreeCore/BTCoreConstants.swift b/Sources/BraintreeCore/BTCoreConstants.swift index 5800160166..19b262b278 100644 --- a/Sources/BraintreeCore/BTCoreConstants.swift +++ b/Sources/BraintreeCore/BTCoreConstants.swift @@ -5,7 +5,7 @@ import Foundation @objcMembers public class BTCoreConstants: NSObject { /// :nodoc: This property is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time. - public static var braintreeSDKVersion: String = "6.23.0" + public static var braintreeSDKVersion: String = "6.23.1" /// :nodoc: This property is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time. public static let callbackURLScheme: String = "sdk.ios.braintree" diff --git a/Sources/BraintreeCore/BTHTTP.swift b/Sources/BraintreeCore/BTHTTP.swift index 7815e4e310..ef72f275e9 100644 --- a/Sources/BraintreeCore/BTHTTP.swift +++ b/Sources/BraintreeCore/BTHTTP.swift @@ -446,8 +446,12 @@ class BTHTTP: NSObject, URLSessionTaskDelegate { let json = try? JSONSerialization.jsonObject(with: data) let body = BTJSON(value: json) - guard let mutationName = body["operationName"].asString() else { return nil } - - return "mutation \(mutationName)" + guard let query = body["query"].asString() else { + return nil + } + + let queryDiscardHolder = query.replacingOccurrences(of: #"^[^\(]*"#, with: "", options: .regularExpression) + let finalQuery = query.replacingOccurrences(of: queryDiscardHolder, with: "") + return finalQuery } } diff --git a/Sources/BraintreeCore/Info.plist b/Sources/BraintreeCore/Info.plist index 3b1106b193..6020a4281a 100644 --- a/Sources/BraintreeCore/Info.plist +++ b/Sources/BraintreeCore/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.23.0 + 6.23.1 CFBundleSignature ???? CFBundleVersion - 6.23.0 + 6.23.1 NSPrincipalClass diff --git a/UnitTests/BraintreeCoreTests/BTHTTP_Tests.swift b/UnitTests/BraintreeCoreTests/BTHTTP_Tests.swift index 4a63babe51..3da79f517b 100644 --- a/UnitTests/BraintreeCoreTests/BTHTTP_Tests.swift +++ b/UnitTests/BraintreeCoreTests/BTHTTP_Tests.swift @@ -757,7 +757,8 @@ final class BTHTTP_Tests: XCTestCase { var originalRequest = URLRequest(url: URL(string: "https://example.com/graphql")!) originalRequest.httpBody = """ { - "operationName": "TestMutation" + "operationName": "TestMutation", + "query": "mutation TestMutation()" } """.data(using: .utf8) let task = testURLSession.dataTask(with: originalRequest)