From df44774d5e34e422350a97936d30bbe46f3596d2 Mon Sep 17 00:00:00 2001 From: Stylianos Tzouvaras Date: Thu, 21 Nov 2024 12:50:49 +0200 Subject: [PATCH] Resolved issue with RQES file permissions --- .../xcshareddata/swiftpm/Package.resolved | 14 ++++++------ .../UI/SignDocument/SignDocumentView.swift | 7 +++++- Modules/logic-business/Package.swift | 2 +- Modules/logic-core/Package.swift | 2 +- .../Extension/RequestItem+Extensions.swift | 22 ------------------- 5 files changed, 15 insertions(+), 32 deletions(-) delete mode 100644 Modules/logic-core/Sources/Extension/RequestItem+Extensions.swift diff --git a/EudiReferenceWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/EudiReferenceWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index c2b6164b..1428defd 100644 --- a/EudiReferenceWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/EudiReferenceWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "42c0b7377392d15a2577e8216efa33676882bcb10f643f56331628a1c7779ce2", + "originHash" : "7e6f3a0f4f417301385ccddd96b735da0c98f09637abc2ac62ad70956a239570", "pins" : [ { "identity" : "activityindicatorview", @@ -114,8 +114,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-iso18013-data-transfer.git", "state" : { - "revision" : "900416bcab3e95a17dea2fbf224210521c5b68d6", - "version" : "0.3.7" + "revision" : "25a71bea1d4bddd7faf8490f39dbf52ef902b671", + "version" : "0.3.8" } }, { @@ -168,8 +168,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-rqes-ui.git", "state" : { - "revision" : "ac5b3c0de81db63023c20c9b4dd70bf94c37eebb", - "version" : "0.0.2" + "revision" : "9fcf589d723349ab8f0b2c54b40f78fc0cfaa12c", + "version" : "0.0.3" } }, { @@ -186,8 +186,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-wallet-kit.git", "state" : { - "revision" : "b58b1bf3b33966dcc5b05e4791ffc7f928cb94fb", - "version" : "0.7.7" + "revision" : "7fae108b12cf1d199c61198fba21539c37956bc7", + "version" : "0.7.8" } }, { diff --git a/Modules/feature-dashboard/Sources/UI/SignDocument/SignDocumentView.swift b/Modules/feature-dashboard/Sources/UI/SignDocument/SignDocumentView.swift index ce520505..251a8a6e 100644 --- a/Modules/feature-dashboard/Sources/UI/SignDocument/SignDocumentView.swift +++ b/Modules/feature-dashboard/Sources/UI/SignDocument/SignDocumentView.swift @@ -40,7 +40,12 @@ struct SignDocumentView: View { onCompletion: { result in switch result { case .success(let url): - viewModel.onFileSelection(with: url) + do { + if url.startAccessingSecurityScopedResource() { + _ = try Data(contentsOf: url) + viewModel.onFileSelection(with: url) + } + } catch { } case .failure: break } diff --git a/Modules/logic-business/Package.swift b/Modules/logic-business/Package.swift index dbaa1f4c..1b258502 100644 --- a/Modules/logic-business/Package.swift +++ b/Modules/logic-business/Package.swift @@ -43,7 +43,7 @@ let package = Package( ), .package( url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-rqes-ui.git", - from: "0.0.2" + exact: "0.0.3" ), .package(name: "logic-test", path: "./logic-test") ], diff --git a/Modules/logic-core/Package.swift b/Modules/logic-core/Package.swift index dc148f04..670a31fc 100644 --- a/Modules/logic-core/Package.swift +++ b/Modules/logic-core/Package.swift @@ -14,7 +14,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-wallet-kit.git", - exact: "0.7.7" + exact: "0.7.8" ), .package( name: "logic-resources", diff --git a/Modules/logic-core/Sources/Extension/RequestItem+Extensions.swift b/Modules/logic-core/Sources/Extension/RequestItem+Extensions.swift deleted file mode 100644 index 1731a4f8..00000000 --- a/Modules/logic-core/Sources/Extension/RequestItem+Extensions.swift +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2023 European Commission - * - * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European - * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work - * except in compliance with the Licence. - * - * You may obtain a copy of the Licence at: - * https://joinup.ec.europa.eu/software/page/eupl - * - * Unless required by applicable law or agreed to in writing, software distributed under - * the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF - * ANY KIND, either express or implied. See the Licence for the specific language - * governing permissions and limitations under the Licence. - */ -import EudiWalletKit - -extension RequestItem: @retroactive Equatable { - public static func == (lhs: RequestItem, rhs: RequestItem) -> Bool { - lhs.elementIdentifier == rhs.elementIdentifier - } -}