Skip to content

Commit

Permalink
minor tweaks and CI conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekinstnt committed Oct 10, 2024
1 parent 846a6d7 commit 619c665
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
44 changes: 44 additions & 0 deletions aries_framework_vcx/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
import class Foundation.ProcessInfo

let package = Package(
name: "InstntAriesFrameworkVCX",
products: [
.library(
name: "InstntAriesFrameworkVCX",
targets: ["InstntAriesFrameworkVCX"]),
],
targets: [
.target(
name: "InstntAriesVCX",
path: "aries_framework_vcx/ios/Source"
),
]
)

let InstntAriesVCXTarget = package.targets.first(where: { $0.name == "InstntAriesFrameworkVCX" })

if ProcessInfo.processInfo.environment["USE_LOCAL_XCFRAMEWORK"] == nil {
package.targets.append(.binaryTarget(
name: "VCX_uniffiFFI_Lib_zip",
path: url: "https://github.com/instnt-inc/instnt-aries-vcx/releases/download/aries-framework-vcx-uniffi-ios/vcx.xcframework.zip",
checksum: "cb1fa78a18a5a5bcd22ffa6c7eba494ff374fa2ab1166b4900640430aeda6194"
))

InstntAriesVCXTarget?.dependencies.append("VCX_uniffiFFI_Lib_zip")

} else {
package.targets.append(.binaryTarget(
name: "uniffiFFI_local",
path: "aries_framework_vcx/ios/Frameworks/vcx.xcframework"))

InstntAriesVCXTarget?.dependencies.append("uniffiFFI_local")

}

11 changes: 9 additions & 2 deletions aries_framework_vcx/src/scripts/ios.build.cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@

# Remove .a file if it is not required and have large size
rm -R ${ABI_PATH}/libuniffi_vcx.a
rm -R ${ABI_PATH}/vcx.xcframework

}

Expand All @@ -79,6 +78,8 @@
export IOS_APP_DIR="${ARIES_VCX_ROOT}/aries_framework_vcx/ios"
export ABI_PATH=${IOS_APP_DIR}/Frameworks

rm -R ${ABI_PATH}/vcx.xcframework

XCFRAMEWORK_PATH="${ABI_PATH}/vcx.xcframework.zip"

# Print for debugging
Expand Down Expand Up @@ -155,5 +156,11 @@
generate_bindings
build_uniffi_for_demo
build_ios_xcframework

if [ "$CI" == "true" ]; then
echo "Running in GitHub Actions"
delete_existing_xcframework
upload_framework
upload_framework
else
echo "Running locally"
fi

0 comments on commit 619c665

Please sign in to comment.