From e45f06c9ec69a24c898330d758f9e643da6ed8b4 Mon Sep 17 00:00:00 2001 From: Goncalo-FradeIOHK Date: Tue, 22 Aug 2023 18:20:30 +0100 Subject: [PATCH] fix: add a missing file that was ignored --- .gitignore | 2 +- uniffi/build-release-apple-universal.sh | 1 + .../anoncreds-swift/Package.swift | 32 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 uniffi/output-frameworks/anoncreds-swift/Package.swift diff --git a/.gitignore b/.gitignore index 6049c08a..9ea94898 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ Cargo.lock uniffi/targets uniffi/wrappers libanoncreds.xcframework.zip -*.swift \ No newline at end of file +uniffi/output-frameworks/anoncreds-swift/AnoncredsSwift/Sources/Swift/*.swift \ No newline at end of file diff --git a/uniffi/build-release-apple-universal.sh b/uniffi/build-release-apple-universal.sh index 67fc5c96..9602af6c 100755 --- a/uniffi/build-release-apple-universal.sh +++ b/uniffi/build-release-apple-universal.sh @@ -72,6 +72,7 @@ zip -r "$dest_dir/$zip_name" "$source_dir/$target_dir_name" echo "Copy .swift binders" rm -f "./output-frameworks/anoncreds-swift/AnoncredsSwift/Sources/Swift/anoncreds.swift" || true +mkdir -p ./output-frameworks/anoncreds-swift/AnoncredsSwift/Sources/Swift || true mv "./wrappers/swift/anoncreds/anoncreds.swift" "./output-frameworks/anoncreds-swift/AnoncredsSwift/Sources/Swift/anoncreds.swift" rm -f "/wrappers/swift/anoncreds/anoncreds.swift" || true diff --git a/uniffi/output-frameworks/anoncreds-swift/Package.swift b/uniffi/output-frameworks/anoncreds-swift/Package.swift new file mode 100644 index 00000000..07f7985d --- /dev/null +++ b/uniffi/output-frameworks/anoncreds-swift/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version:5.7 +import PackageDescription + +let package = Package( + name: "AnoncredsSwift", + platforms: [ + .iOS(.v13), + .macOS(.v12) + ], + products: [ + .library( + name: "AnoncredsSwift", + type: .dynamic, + targets: ["AnoncredsSwift"] + ), + ], + targets: [ + .target( + name: "AnoncredsSwift", + dependencies: ["anoncredsFFI"], + path: "AnoncredsSwift/Sources/Swift" + ), + .target( + name: "anoncredsFFI", + dependencies: ["libanoncreds"], + path: "AnoncredsSwift/Sources/C"), + .binaryTarget( + name: "libanoncreds", + path: "./libanoncreds.xcframework.zip" + ) + ] +)