diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03849a6a..d1420231 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: run: ssh-keyscan -H github.com >> ~/.ssh/known_hosts - name: Install lcov - run: brew install lcov + run: brew install lcov@5.1.0 && brew link --overwrite --force lcov@5.1.0 - name: Build and test env: diff --git a/Package.swift b/Package.swift index b6cedb04..672f92cb 100644 --- a/Package.swift +++ b/Package.swift @@ -65,7 +65,7 @@ let package = Package( .package(url: "https://github.com/kylef/JSONSchema.swift.git", exact: "0.6.0"), .package(url: "https://github.com/eu-digital-identity-wallet/eudi-lib-sdjwt-swift.git", from: "0.1.0"), .package(url: "https://github.com/1024jp/GzipSwift.git", exact: "6.0.0"), - .package(url: "https://github.com/goncalo-frade-iohk/eudi-lib-ios-openid4vci-swift.git", branch: "feature/add-w3cvc-support") + .package(url: "https://github.com/goncalo-frade-iohk/eudi-lib-ios-openid4vci-swift.git", from: "0.9.0") ], targets: [ .target( diff --git a/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo.xcodeproj/project.pbxproj b/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo.xcodeproj/project.pbxproj index f1fc6c9c..ae9f1207 100644 --- a/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo.xcodeproj/project.pbxproj +++ b/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo.xcodeproj/project.pbxproj @@ -151,7 +151,6 @@ EE0E1FAF29473B10003CD7D5 /* SteradianMedium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SteradianMedium.otf; sourceTree = ""; }; EE0E1FB029473B10003CD7D5 /* SteradianRegular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SteradianRegular.otf; sourceTree = ""; }; EE2D40962ACC470100CF9446 /* CredentialDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CredentialDetailViewModel.swift; sourceTree = ""; }; - EE38134E2938D55D00A3A710 /* atala-prism-swift-sdk */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "atala-prism-swift-sdk"; path = ../..; sourceTree = ""; }; EE418ADD2BCFD925008766A6 /* PresentationDetailViewState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailViewState.swift; sourceTree = ""; }; EE418ADE2BCFD925008766A6 /* PresentationDetailViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailViewModel.swift; sourceTree = ""; }; EE418ADF2BCFD925008766A6 /* PresentationDetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailView.swift; sourceTree = ""; }; @@ -317,14 +316,6 @@ path = fonts; sourceTree = ""; }; - EE38134D2938D55D00A3A710 /* Packages */ = { - isa = PBXGroup; - children = ( - EE38134E2938D55D00A3A710 /* atala-prism-swift-sdk */, - ); - name = Packages; - sourceTree = ""; - }; EE418ADB2BCFD925008766A6 /* Verifier */ = { isa = PBXGroup; children = ( @@ -663,7 +654,6 @@ EEE61FAD2937CA280053AE52 = { isa = PBXGroup; children = ( - EE38134D2938D55D00A3A710 /* Packages */, EEE61FB82937CA280053AE52 /* AtalaPrismWalletDemo */, EEE61FB72937CA280053AE52 /* Products */, EEE61FEB2937DCBE0053AE52 /* Frameworks */, @@ -882,6 +872,7 @@ ); mainGroup = EEE61FAD2937CA280053AE52; packageReferences = ( + EE86C3C82CF5EC750072BEB7 /* XCRemoteSwiftPackageReference "identus-edge-agent-sdk-swift" */, ); productRefGroup = EEE61FB72937CA280053AE52 /* Products */; projectDirPath = ""; @@ -1243,6 +1234,17 @@ }; /* End XCConfigurationList section */ +/* Begin XCRemoteSwiftPackageReference section */ + EE86C3C82CF5EC750072BEB7 /* XCRemoteSwiftPackageReference "identus-edge-agent-sdk-swift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/hyperledger/identus-edge-agent-sdk-swift"; + requirement = { + kind = exactVersion; + version = 7.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + /* Begin XCSwiftPackageProductDependency section */ EE38134F2938D5B100A3A710 /* Apollo */ = { isa = XCSwiftPackageProductDependency; diff --git a/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/Verifier/PresentationsDetail/PresentationDetailViewModel.swift b/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/Verifier/PresentationsDetail/PresentationDetailViewModel.swift index 27d95879..e08b3388 100644 --- a/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/Verifier/PresentationsDetail/PresentationDetailViewModel.swift +++ b/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/Verifier/PresentationsDetail/PresentationDetailViewModel.swift @@ -156,7 +156,7 @@ public func getDataFromAttachment(attachmentDescriptor: AttachmentDescriptor) th case let value as AttachmentBase64: return Data(base64Encoded: value.base64)! case let value as AttachmentJsonData: - return value.data + return try JSONEncoder().encode(value.json) default: throw UnknownError.somethingWentWrongError(customMessage: nil, underlyingErrors: nil) } diff --git a/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/WalletDemo2/Messages/MessageDetail/MessageDetailViewModel.swift b/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/WalletDemo2/Messages/MessageDetail/MessageDetailViewModel.swift index 657443ab..a8780557 100644 --- a/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/WalletDemo2/Messages/MessageDetail/MessageDetailViewModel.swift +++ b/Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/WalletDemo2/Messages/MessageDetail/MessageDetailViewModel.swift @@ -166,7 +166,7 @@ private func getDomainAndChallenge(msg: Message) throws -> (domain: String?, cha .map({ switch $0.data { case let json as AttachmentJsonData: - return json.data + return json.json default: return nil } @@ -174,7 +174,7 @@ private func getDomainAndChallenge(msg: Message) throws -> (domain: String?, cha .compactMap({ $0 }) .first else { throw PolluxError.offerDoesntProvideEnoughInformation } - let jsonObject = try JSONSerialization.jsonObject(with: offerData) + let jsonObject = try JSONSerialization.jsonObject(with: JSONEncoder().encode(offerData)) return (findValue(forKey: "domain", in: jsonObject), findValue(forKey: "challenge", in: jsonObject)) }