Installation
- iOS
- Android
Manual Installation
- Drag
SashaSDK.xcframework
directly 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.xcframework
inside that folder. -
In the same folder, create a file named
Package.swift
with 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 AAR file to your project:
- Create a
libs
directory in your app module (e.g.,YourAppProject/app/libs/
). - Copy the
sasha-sdk-release.aar
file into thislibs
directory.
- Create a
-
Add AAR and transient dependencies: Open your app-level
build.gradle.kts
(orbuild.gradle
) file and add the following to yourdependencies
block:implementation(files("libs/sasha-sdk-release.aar"))
// Add other transient dependencies required by the SDK
api("net.java.dev.jna:jna:5.17.0@aar")
implementation("com.connectrpc:connect-kotlin-google-java-ext:0.7.4")
implementation("com.google.protobuf:protobuf-java:4.32.1")