This repository contains build scripts that helps prepare PowerAuth mobile SDK for integration with Swift Package Manager. The repository also contains Package.swift
file describing an actual PowerAuth mobile SDK releases for SPM.
The PowerAuth mobile SDK doesn't support Swift Package Manager directly. Instead of this, you have to add this repository as a package source. So add https://github.com/wultra/powerauth-mobile-sdk-spm
repository as a package in Xcode UI and add PowerAuth2
and PowerAuthCore
libraries as a dependency.
Alternatively, you can add the dependency manually. For example:
// swift-tools-version:5.7
import PackageDescription
let package = Package(
name: "YourLibrary",
platforms: [
.iOS(.v11),
.tvOS(.v11)
],
products: [
.library(
name: "YourLibrary",
targets: ["YourLibrary"]),
],
dependencies: [
.package(url: "https://github.com/wultra/powerauth-mobile-sdk-spm.git", .upToNextMinor(from: "1.7.8"))
],
targets: [
.target(
name: "YourLibrary",
dependencies: [
.product(name: "PowerAuth2", package: "powerauth-mobile-sdk-spm"),
.product(name: "PowerAuthCore", package: "powerauth-mobile-sdk-spm"),
]
)
]
)
jq
command, required by deploy.sh
deploy.sh
The main deployment script that do the following tasks:
sdk-sources
folder.PowerAuth2.xcframework
and PowerAuthCore.xcframework
.Package.swift
.Package.swift
to git.The usage of the script is simple, just specify a version of PowerAuth mobile SDK to prepare for SPM. For example:
$ ./deploy.sh 1.6.2
build.sh
The build script is useful in case that you need to manually prepare XCFrameworks for manual library integration. The script does the following tasks:
sdk-sources
folder.PowerAuth2.xcframework
and PowerAuthCore.xcframework
.frameworks
folder.The usage of the script is simple, just specify a version of PowerAuth mobile SDK to build. For example:
$ ./build.sh 1.6.2
The result is stored in frameworks
folder.
The following support scripts are also present in the repository in scripts
folder:
config.sh
- contains shared configuration for all scripts in this repository.clone.sh
- allows clone PowerAuth mobile SDK at a specific version.common-functions.sh
- a script with common functions, shared across various projects at Wultra.github-client.sh
- github REST API client implementing release and release assets management.link |
Stars: 0 |
Last commit: 27 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics