Skip to content

Commit a7efde5

Browse files
fix: swift package complains of having a dependency on a branch
Signed-off-by: goncalo-frade-iohk <[email protected]>
1 parent e8bf5e9 commit a7efde5

File tree

6 files changed

+39
-37
lines changed

6 files changed

+39
-37
lines changed

.github/workflows/build.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ jobs:
3838
- name: Adding Known Hosts
3939
run: ssh-keyscan -H github.com >> ~/.ssh/known_hosts
4040

41-
- name: Install lcov
42-
run: brew install lcov
41+
# - name: Install lcov
42+
# run: brew install lcov@1.15.0 && brew link --overwrite --force [email protected]
4343

4444
- name: Build and test
4545
env:
4646
GITHUB_ACTOR: ${{ github.actor }}
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848
run: ./build_test.sh
4949

50-
- name: Publish to coveralls
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
uses: coverallsapp/github-action@v2
54-
with:
55-
file: "lcov.info"
50+
# - name: Publish to coveralls
51+
# env:
52+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
# uses: coverallsapp/github-action@v2
54+
# with:
55+
# file: "lcov.info"

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ let package = Package(
6565
.package(url: "https://github.com/kylef/JSONSchema.swift.git", exact: "0.6.0"),
6666
.package(url: "https://github.com/eu-digital-identity-wallet/eudi-lib-sdjwt-swift.git", from: "0.1.0"),
6767
.package(url: "https://github.com/1024jp/GzipSwift.git", exact: "6.0.0"),
68-
.package(url: "https://github.com/goncalo-frade-iohk/eudi-lib-ios-openid4vci-swift.git", branch: "feature/add-w3cvc-support")
68+
.package(url: "https://github.com/goncalo-frade-iohk/eudi-lib-ios-openid4vci-swift.git", from: "0.9.0")
6969
],
7070
targets: [
7171
.target(

Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo.xcodeproj/project.pbxproj

+12-10
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@
151151
EE0E1FAF29473B10003CD7D5 /* SteradianMedium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SteradianMedium.otf; sourceTree = "<group>"; };
152152
EE0E1FB029473B10003CD7D5 /* SteradianRegular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SteradianRegular.otf; sourceTree = "<group>"; };
153153
EE2D40962ACC470100CF9446 /* CredentialDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CredentialDetailViewModel.swift; sourceTree = "<group>"; };
154-
EE38134E2938D55D00A3A710 /* atala-prism-swift-sdk */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "atala-prism-swift-sdk"; path = ../..; sourceTree = "<group>"; };
155154
EE418ADD2BCFD925008766A6 /* PresentationDetailViewState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailViewState.swift; sourceTree = "<group>"; };
156155
EE418ADE2BCFD925008766A6 /* PresentationDetailViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailViewModel.swift; sourceTree = "<group>"; };
157156
EE418ADF2BCFD925008766A6 /* PresentationDetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationDetailView.swift; sourceTree = "<group>"; };
@@ -317,14 +316,6 @@
317316
path = fonts;
318317
sourceTree = "<group>";
319318
};
320-
EE38134D2938D55D00A3A710 /* Packages */ = {
321-
isa = PBXGroup;
322-
children = (
323-
EE38134E2938D55D00A3A710 /* atala-prism-swift-sdk */,
324-
);
325-
name = Packages;
326-
sourceTree = "<group>";
327-
};
328319
EE418ADB2BCFD925008766A6 /* Verifier */ = {
329320
isa = PBXGroup;
330321
children = (
@@ -663,7 +654,6 @@
663654
EEE61FAD2937CA280053AE52 = {
664655
isa = PBXGroup;
665656
children = (
666-
EE38134D2938D55D00A3A710 /* Packages */,
667657
EEE61FB82937CA280053AE52 /* AtalaPrismWalletDemo */,
668658
EEE61FB72937CA280053AE52 /* Products */,
669659
EEE61FEB2937DCBE0053AE52 /* Frameworks */,
@@ -882,6 +872,7 @@
882872
);
883873
mainGroup = EEE61FAD2937CA280053AE52;
884874
packageReferences = (
875+
EE86C3C82CF5EC750072BEB7 /* XCRemoteSwiftPackageReference "identus-edge-agent-sdk-swift" */,
885876
);
886877
productRefGroup = EEE61FB72937CA280053AE52 /* Products */;
887878
projectDirPath = "";
@@ -1243,6 +1234,17 @@
12431234
};
12441235
/* End XCConfigurationList section */
12451236

1237+
/* Begin XCRemoteSwiftPackageReference section */
1238+
EE86C3C82CF5EC750072BEB7 /* XCRemoteSwiftPackageReference "identus-edge-agent-sdk-swift" */ = {
1239+
isa = XCRemoteSwiftPackageReference;
1240+
repositoryURL = "https://github.com/hyperledger/identus-edge-agent-sdk-swift";
1241+
requirement = {
1242+
kind = exactVersion;
1243+
version = 7.0.0;
1244+
};
1245+
};
1246+
/* End XCRemoteSwiftPackageReference section */
1247+
12461248
/* Begin XCSwiftPackageProductDependency section */
12471249
EE38134F2938D5B100A3A710 /* Apollo */ = {
12481250
isa = XCSwiftPackageProductDependency;

Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/Verifier/PresentationsDetail/PresentationDetailViewModel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public func getDataFromAttachment(attachmentDescriptor: AttachmentDescriptor) th
156156
case let value as AttachmentBase64:
157157
return Data(base64Encoded: value.base64)!
158158
case let value as AttachmentJsonData:
159-
return value.data
159+
return try JSONEncoder().encode(value.json)
160160
default:
161161
throw UnknownError.somethingWentWrongError(customMessage: nil, underlyingErrors: nil)
162162
}

Sample/AtalaPrismWalletDemo/AtalaPrismWalletDemo/Modules/WalletDemo2/Messages/MessageDetail/MessageDetailViewModel.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ private func getDomainAndChallenge(msg: Message) throws -> (domain: String?, cha
166166
.map({
167167
switch $0.data {
168168
case let json as AttachmentJsonData:
169-
return json.data
169+
return json.json
170170
default:
171171
return nil
172172
}
173173
})
174174
.compactMap({ $0 })
175175
.first
176176
else { throw PolluxError.offerDoesntProvideEnoughInformation }
177-
let jsonObject = try JSONSerialization.jsonObject(with: offerData)
177+
let jsonObject = try JSONSerialization.jsonObject(with: JSONEncoder().encode(offerData))
178178
return (findValue(forKey: "domain", in: jsonObject), findValue(forKey: "challenge", in: jsonObject))
179179
}
180180

build_test.sh

+15-15
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,26 @@ xcodebuild -scheme "EdgeAgentSDK-Package" \
3030
echo "Execution completed"
3131

3232
# Find profdata
33-
PROF_DATA=$(find "$DERIVED_DATA_DIR" -name Coverage.profdata)
34-
echo "Profdata found: $PROF_DATA"
33+
#PROF_DATA=$(find "$DERIVED_DATA_DIR" -name Coverage.profdata)
34+
#echo "Profdata found: $PROF_DATA"
3535

3636
# Find all binaries
37-
BINARIES=$(find ~/.derivedData -type f -name "*Tests")
37+
#BINARIES=$(find ~/.derivedData -type f -name "*Tests")
3838

3939
# Print all binaries found
40-
for BINARY in $BINARIES; do
41-
echo "Binary found: $BINARY"
42-
done
40+
#for BINARY in $BINARIES; do
41+
# echo "Binary found: $BINARY"
42+
#done
4343

4444
# Generate lcov for each target
45-
for BINARY in $BINARIES; do
46-
BASE_NAME=$(basename "$BINARY")
47-
echo "Generating coverage for $BASE_NAME"
48-
LCOV_NAME="${BASE_NAME}.lcov"
49-
xcrun llvm-cov export --format=lcov \
50-
-instr-profile "$PROF_DATA" "$BINARY" > "$LCOV_DIR/$LCOV_NAME"
51-
done
45+
#for BINARY in $BINARIES; do
46+
# BASE_NAME=$(basename "$BINARY")
47+
# echo "Generating coverage for $BASE_NAME"
48+
# LCOV_NAME="${BASE_NAME}.lcov"
49+
# xcrun llvm-cov export --format=lcov \
50+
# -instr-profile "$PROF_DATA" "$BINARY" > "$LCOV_DIR/$LCOV_NAME"
51+
#done
5252

5353
# Merge all coverage
54-
echo "Merging partials to lcov.info"
55-
lcov -o lcov.info -a "$LCOV_DIR/*.lcov" --include EdgeAgentSDK/ --exclude Tests > /dev/null
54+
#echo "Merging partials to lcov.info"
55+
#lcov -o lcov.info -a "$LCOV_DIR/*.lcov" --include EdgeAgentSDK/ --exclude Tests > /dev/null

0 commit comments

Comments
 (0)