diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03849a6a..46b4f005 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,8 +38,8 @@ jobs: - name: Adding Known Hosts run: ssh-keyscan -H github.com >> ~/.ssh/known_hosts - - name: Install lcov - run: brew install lcov +# - name: Install lcov +# run: brew install lcov@1.15.0 && brew link --overwrite --force lcov@1.15.0 - name: Build and test env: @@ -47,9 +47,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./build_test.sh - - name: Publish to coveralls - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: coverallsapp/github-action@v2 - with: - file: "lcov.info" +# - name: Publish to coveralls +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# uses: coverallsapp/github-action@v2 +# with: +# file: "lcov.info" 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)) } diff --git a/build_test.sh b/build_test.sh index a20b04f3..6c85acaf 100755 --- a/build_test.sh +++ b/build_test.sh @@ -30,26 +30,26 @@ xcodebuild -scheme "EdgeAgentSDK-Package" \ echo "Execution completed" # Find profdata -PROF_DATA=$(find "$DERIVED_DATA_DIR" -name Coverage.profdata) -echo "Profdata found: $PROF_DATA" +#PROF_DATA=$(find "$DERIVED_DATA_DIR" -name Coverage.profdata) +#echo "Profdata found: $PROF_DATA" # Find all binaries -BINARIES=$(find ~/.derivedData -type f -name "*Tests") +#BINARIES=$(find ~/.derivedData -type f -name "*Tests") # Print all binaries found -for BINARY in $BINARIES; do - echo "Binary found: $BINARY" -done +#for BINARY in $BINARIES; do +# echo "Binary found: $BINARY" +#done # Generate lcov for each target -for BINARY in $BINARIES; do - BASE_NAME=$(basename "$BINARY") - echo "Generating coverage for $BASE_NAME" - LCOV_NAME="${BASE_NAME}.lcov" - xcrun llvm-cov export --format=lcov \ - -instr-profile "$PROF_DATA" "$BINARY" > "$LCOV_DIR/$LCOV_NAME" -done +#for BINARY in $BINARIES; do +# BASE_NAME=$(basename "$BINARY") +# echo "Generating coverage for $BASE_NAME" +# LCOV_NAME="${BASE_NAME}.lcov" +# xcrun llvm-cov export --format=lcov \ +# -instr-profile "$PROF_DATA" "$BINARY" > "$LCOV_DIR/$LCOV_NAME" +#done # Merge all coverage -echo "Merging partials to lcov.info" -lcov -o lcov.info -a "$LCOV_DIR/*.lcov" --include EdgeAgentSDK/ --exclude Tests > /dev/null +#echo "Merging partials to lcov.info" +#lcov -o lcov.info -a "$LCOV_DIR/*.lcov" --include EdgeAgentSDK/ --exclude Tests > /dev/null