Skip to content

Commit

Permalink
fix: swift package complains of having a dependency on a branch
Browse files Browse the repository at this point in the history
Signed-off-by: goncalo-frade-iohk <[email protected]>
  • Loading branch information
goncalo-frade-iohk committed Nov 26, 2024
1 parent e8bf5e9 commit cc0a99f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

- name: Build and test
env:
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
EE0E1FAF29473B10003CD7D5 /* SteradianMedium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SteradianMedium.otf; sourceTree = "<group>"; };
EE0E1FB029473B10003CD7D5 /* SteradianRegular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SteradianRegular.otf; sourceTree = "<group>"; };
EE2D40962ACC470100CF9446 /* CredentialDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CredentialDetailViewModel.swift; sourceTree = "<group>"; };
EE38134E2938D55D00A3A710 /* atala-prism-swift-sdk */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "atala-prism-swift-sdk"; path = ../..; sourceTree = "<group>"; };
EE418ADD2BCFD925008766A6 /* PresentationDetailViewState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailViewState.swift; sourceTree = "<group>"; };
EE418ADE2BCFD925008766A6 /* PresentationDetailViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailViewModel.swift; sourceTree = "<group>"; };
EE418ADF2BCFD925008766A6 /* PresentationDetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -317,14 +316,6 @@
path = fonts;
sourceTree = "<group>";
};
EE38134D2938D55D00A3A710 /* Packages */ = {
isa = PBXGroup;
children = (
EE38134E2938D55D00A3A710 /* atala-prism-swift-sdk */,
);
name = Packages;
sourceTree = "<group>";
};
EE418ADB2BCFD925008766A6 /* Verifier */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -663,7 +654,6 @@
EEE61FAD2937CA280053AE52 = {
isa = PBXGroup;
children = (
EE38134D2938D55D00A3A710 /* Packages */,
EEE61FB82937CA280053AE52 /* AtalaPrismWalletDemo */,
EEE61FB72937CA280053AE52 /* Products */,
EEE61FEB2937DCBE0053AE52 /* Frameworks */,
Expand Down Expand Up @@ -882,6 +872,7 @@
);
mainGroup = EEE61FAD2937CA280053AE52;
packageReferences = (
EE86C3C82CF5EC750072BEB7 /* XCRemoteSwiftPackageReference "identus-edge-agent-sdk-swift" */,
);
productRefGroup = EEE61FB72937CA280053AE52 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ 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
}
})
.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))
}

Expand Down

0 comments on commit cc0a99f

Please sign in to comment.