diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e731c9b2..f73662b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,8 @@ jobs: fail-fast: false matrix: include: - - os: macos-12 - xcode_version: 14.2 + - os: macos-13 + xcode_version: 15.2 fastlane_task: unit_tests runs-on: ${{ matrix.os }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 0c469ac8..a9c8c18f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: include: - - os: macos-12 + - os: macos-13 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index a5f3e10d..6991a35f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ Changelog ========= +[1.0.0-beta19](https://github.com/hyperwallet/hyperwallet-ios-sdk/releases/tag/1.0.0-beta17) + ------------------- + - Updated ci to xcode version 15 + - Add privacy manifest + [1.0.0-beta17](https://github.com/hyperwallet/hyperwallet-ios-sdk/releases/tag/1.0.0-beta17) ------------------- - Handle HTTP 401 diff --git a/HyperwalletSDK.podspec b/HyperwalletSDK.podspec index 18814d05..620adb64 100644 --- a/HyperwalletSDK.podspec +++ b/HyperwalletSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'HyperwalletSDK' - spec.version = '1.0.0-beta18' + spec.version = '1.0.0-beta19' spec.summary = 'Hyperwallet Core SDK for iOS to integrate with Hyperwallet Platform' spec.homepage = 'https://github.com/hyperwallet/hyperwallet-ios-sdk' spec.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/HyperwalletSDK.xcodeproj/project.pbxproj b/HyperwalletSDK.xcodeproj/project.pbxproj index 7a1bf300..45bfecf2 100644 --- a/HyperwalletSDK.xcodeproj/project.pbxproj +++ b/HyperwalletSDK.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -62,6 +62,7 @@ B327ED8923C691880007EF58 /* ListUserBalancesResponseWithCurrencyFilter.json in Resources */ = {isa = PBXBuildFile; fileRef = B327ED8823C691880007EF58 /* ListUserBalancesResponseWithCurrencyFilter.json */; }; B327ED8B23C6A5C70007EF58 /* ListUserBalancesResponseSuccess.json in Resources */ = {isa = PBXBuildFile; fileRef = B327ED8A23C6A5C60007EF58 /* ListUserBalancesResponseSuccess.json */; }; B327ED8D23C6B43E0007EF58 /* ListUserBalancesResponseSortCurrencyDesc.json in Resources */ = {isa = PBXBuildFile; fileRef = B327ED8C23C6B43E0007EF58 /* ListUserBalancesResponseSortCurrencyDesc.json */; }; + B4E1984D2B8D4CF5003FBDDE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = B4E1984C2B8D4CF5003FBDDE /* PrivacyInfo.xcprivacy */; }; DB0AFDF32277725600ABEFFD /* HyperwalletUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB0AFDF22277725600ABEFFD /* HyperwalletUser.swift */; }; DB0AFDF62277869500ABEFFD /* HyperwalletUserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB0AFDF42277868E00ABEFFD /* HyperwalletUserTests.swift */; }; DB1A03D7225D3DD80080C8D6 /* AnyCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB1A03CA225D3DD80080C8D6 /* AnyCodable.swift */; }; @@ -220,6 +221,7 @@ B327ED8823C691880007EF58 /* ListUserBalancesResponseWithCurrencyFilter.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = ListUserBalancesResponseWithCurrencyFilter.json; sourceTree = ""; }; B327ED8A23C6A5C60007EF58 /* ListUserBalancesResponseSuccess.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = ListUserBalancesResponseSuccess.json; sourceTree = ""; }; B327ED8C23C6B43E0007EF58 /* ListUserBalancesResponseSortCurrencyDesc.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = ListUserBalancesResponseSortCurrencyDesc.json; sourceTree = ""; }; + B4E1984C2B8D4CF5003FBDDE /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; DB0AFDF22277725600ABEFFD /* HyperwalletUser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HyperwalletUser.swift; sourceTree = ""; }; DB0AFDF42277868E00ABEFFD /* HyperwalletUserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HyperwalletUserTests.swift; sourceTree = ""; }; DB1A03CA225D3DD80080C8D6 /* AnyCodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnyCodable.swift; sourceTree = ""; }; @@ -431,6 +433,7 @@ DB1A03D5225D3DD80080C8D6 /* HyperwalletError.swift */, DB1A03CB225D3DD80080C8D6 /* TransactionType.swift */, 98101DBE2238A2F000BA04CA /* Info.plist */, + B4E1984C2B8D4CF5003FBDDE /* PrivacyInfo.xcprivacy */, DB2A3B082261D2DC0049F891 /* HyperwalletSDK.h */, ); path = Sources; @@ -803,6 +806,7 @@ DB866F272261EE28003C41F6 /* HyperwalletSDK.podspec in Resources */, FDF2E7A6257E06D600589076 /* TransferMethodUpdateConfigurationFieldsResponse.json in Resources */, 980C15DB2273BF91004C60D6 /* CHANGELOG.md in Resources */, + B4E1984D2B8D4CF5003FBDDE /* PrivacyInfo.xcprivacy in Resources */, DB866F282261EE28003C41F6 /* Cartfile.private in Resources */, DB866F2A2261EE28003C41F6 /* README.md in Resources */, DB866F292261EE28003C41F6 /* LICENSE in Resources */, diff --git a/Sources/PrivacyInfo.xcprivacy b/Sources/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..8be288fd --- /dev/null +++ b/Sources/PrivacyInfo.xcprivacy @@ -0,0 +1,84 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeName + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeEmailAddress + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhoneNumber + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhysicalAddress + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePaymentInfo + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyTracking + + + + diff --git a/Sources/TransactionType.swift b/Sources/TransactionType.swift index 3f1b8dde..88d84c85 100644 --- a/Sources/TransactionType.swift +++ b/Sources/TransactionType.swift @@ -70,7 +70,7 @@ internal enum TransactionType { var request = URLRequest(url: url) request.addValue("Bearer " + configuration.authorization, forHTTPHeaderField: "Authorization") request.httpMethod = method.rawValue - if httpBody != nil, (method == .post || method == .put) { + if httpBody != nil, method == .post || method == .put { let encoder = JSONEncoder() let data = try? encoder.encode(httpBody) request.httpBody = data diff --git a/Tests/HTTPTransactionTests.swift b/Tests/HTTPTransactionTests.swift index 4b7ec855..ce7bb55e 100644 --- a/Tests/HTTPTransactionTests.swift +++ b/Tests/HTTPTransactionTests.swift @@ -357,7 +357,7 @@ class HTTPTransactionTests: XCTestCase { func testPerformRest_invalidRestUrl_invalidRequest() { // Given - let authorizationTokenMock = AuthenticationTokenGeneratorMock(restUrl: "Invalid url", graphQlUrl: "Invalid url") + let authorizationTokenMock = AuthenticationTokenGeneratorMock(restUrl: "", graphQlUrl: "Invalid url") buildInvalidTransaction(authorizationTokenMock.token) var response: [String: String]? var hyperwalletError: HyperwalletErrorType? diff --git a/Tests/TransactionTypeTests.swift b/Tests/TransactionTypeTests.swift index ed2e3fcd..e7449933 100644 --- a/Tests/TransactionTypeTests.swift +++ b/Tests/TransactionTypeTests.swift @@ -65,7 +65,7 @@ class TransactionTypeTests: XCTestCase { clientToken: "", expiresOn: 10, graphQlUrl: "", - restUrl: "localhost/", + restUrl: "", environment: "", insightsUrl: "", issuer: "", @@ -75,7 +75,7 @@ class TransactionTypeTests: XCTestCase { XCTAssertThrowsError(try transactionType.createRequest(configuration, method: .post, - urlPath: "?$filter=owners/ref eq 'test'", + urlPath: "", httpBody: "")) { error in XCTAssertEqual((error as! HyperwalletErrorType).getHyperwalletErrors()?.errorList?.first?.code, "INVALID_URL")