Skip to content

Commit

Permalink
[DTSERWONE-1984] add privacy manifest (#139)
Browse files Browse the repository at this point in the history
* add privacy manifest

* update privacy manifest and fix lint issue

* update ci xcode version

* update unit tests

* update change log
  • Loading branch information
mwasdamji-hw-dev authored Feb 26, 2024
1 parent 2deb663 commit 87b500d
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
include:
- os: macos-12
- os: macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion HyperwalletSDK.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
6 changes: 5 additions & 1 deletion HyperwalletSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -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 */; };
Expand Down Expand Up @@ -220,6 +221,7 @@
B327ED8823C691880007EF58 /* ListUserBalancesResponseWithCurrencyFilter.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = ListUserBalancesResponseWithCurrencyFilter.json; sourceTree = "<group>"; };
B327ED8A23C6A5C60007EF58 /* ListUserBalancesResponseSuccess.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = ListUserBalancesResponseSuccess.json; sourceTree = "<group>"; };
B327ED8C23C6B43E0007EF58 /* ListUserBalancesResponseSortCurrencyDesc.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = ListUserBalancesResponseSortCurrencyDesc.json; sourceTree = "<group>"; };
B4E1984C2B8D4CF5003FBDDE /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
DB0AFDF22277725600ABEFFD /* HyperwalletUser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HyperwalletUser.swift; sourceTree = "<group>"; };
DB0AFDF42277868E00ABEFFD /* HyperwalletUserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HyperwalletUserTests.swift; sourceTree = "<group>"; };
DB1A03CA225D3DD80080C8D6 /* AnyCodable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnyCodable.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -431,6 +433,7 @@
DB1A03D5225D3DD80080C8D6 /* HyperwalletError.swift */,
DB1A03CB225D3DD80080C8D6 /* TransactionType.swift */,
98101DBE2238A2F000BA04CA /* Info.plist */,
B4E1984C2B8D4CF5003FBDDE /* PrivacyInfo.xcprivacy */,
DB2A3B082261D2DC0049F891 /* HyperwalletSDK.h */,
);
path = Sources;
Expand Down Expand Up @@ -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 */,
Expand Down
84 changes: 84 additions & 0 deletions Sources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeUserID</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeName</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeEmailAddress</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePhoneNumber</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePhysicalAddress</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePaymentInfo</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

2 changes: 1 addition & 1 deletion Sources/TransactionType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/HTTPTransactionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
4 changes: 2 additions & 2 deletions Tests/TransactionTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TransactionTypeTests: XCTestCase {
clientToken: "",
expiresOn: 10,
graphQlUrl: "",
restUrl: "localhost/",
restUrl: "",
environment: "",
insightsUrl: "",
issuer: "",
Expand All @@ -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")
Expand Down

0 comments on commit 87b500d

Please sign in to comment.