Installation
- iOS
- Android
Manual Installation
- Drag
SashaSDK.xcframeworkdirectly into your Xcode project. - Make sure it's added under your target's Frameworks, Libraries, and Embedded Content.
Add Local Swift Package
As per now, we don't support Swift Package Manager. However, you can support this by using a local package in your project.
If you prefer to include the SDK directly in your own repository:
-
Create a new folder in your project, for example:
mkdir -p ThirdParty/SashaSDK -
Place
SashaSDK.xcframeworkinside that folder. -
In the same folder, create a file named
Package.swiftwith the following content:
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "SashaSDK",
platforms: [
.iOS(.v15)
],
products: [
.library(
name: "SashaSDK",
targets: ["SashaSDK"]
)
],
targets: [
.binaryTarget(
name: "SashaSDK",
path: "SashaSDK.xcframework"
)
]
)
- In Xcode, go to File → Add Packages… → Add Local…
- Select the folder you just created (
ThirdParty/SashaSDK). - Add SashaSDK to your target.
Using this method allows you to manage SashaSDK via Swift Package Manager locally, even though the SDK itself doesn't officially support SPM.
To integrate the Sasha SDK into your project, follow these steps:
-
Add the source files to your project:
-
Create a
libsdirectory in your app module (e.g.,YourAppProject/app/libs/). -
Copy the contents of the provided .zip-folder containing the sources for the Sasha SDK and paste them into the "app/libs" folder you created in the step above
-
You should end up with the following hierarchy:
YourAppProject/
└── app/
└── libs/
└── eu/
└── sasha/
└── sasha-sdk/
└── {latest_version}/
├── sasha-sdk-{latest_version}.aar
├── sasha-sdk-{latest_version}.pom
├── sasha-sdk-{latest_version}-javadoc.jar
-
-
Configure your project's
settings.gradle.kts:- Open your project's
settings.gradle.ktsfile. - Add a
mavenblock to therepositoriessection, pointing to yourapp/libsdirectory, where the Sasha SDK is now located. This should be added within thedependencyResolutionManagementblock, which should then look like the following:dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
// Add this block to declare your local Maven repository
maven {
url = uri("app/libs")
}
}
}
- Open your project's
-
Add the SDK dependency: Open your app-level
build.gradle.ktsfile and add the following to yourdependenciesblock:implementation("eu.sasha:sasha-sdk:{latest_version}")