Getting a client SDK
To begin distributing data with Diffusion® Cloud, you must use one of our SDKs (or REST API for Diffusion® Cloud). Diffusion SDKs provide a high-level interface to communicate with Diffusion® Cloud within your own applications.
Each SDK has accompanying API Documentation and code examples. You can also browse our Developer Hub for more resources.
Java
- Requirements
-
-
Java 8 (8u131-b11 GA or later) or Java 11 (11.0.3 GA or later).
-
- Install with Maven
-
-
Add the DiffusionData™ public repository and Diffusion client to your
pom.xml
file:<repositories> <repository> <id>diffusion-data-repository</id> <url>https://download.diffusiondata.com/maven/</url> </repository> </repositories> <dependency> <groupId>com.pushtechnology.diffusion</groupId> <artifactId>diffusion-client</artifactId> <version>version</version> </dependency>
-
- Install with Gradle
-
-
Add the DiffusionData™ public repository to your
build.gradle
file:repositories { maven { url "https://download.diffusiondata.com/maven/" } }
-
Declare the following dependency in your
build.gradle
filecompile 'com.pushtechnology.diffusion:diffusion-client:6.11.2'
-
Swift
- Requirements
-
-
XCode 12.4 or higher
-
- Install via Swift Package Manager
-
-
Select
File
→Swift Packages
→Add Package Dependency
-
- Install via Package.swift
-
-
You can add Diffusion® Cloud as a package dependency in your
Package.swift
file:let package = Package( //... dependencies: [ .package( name: "Diffusion", url: "https://github.com/diffusiondata/diffusion-swift" ), ], )
-
Android
- Install with Gradle
-
-
Add the DiffusionData™ public repository to your
build.gradle
file:repositories { maven { url "https://download.diffusiondata.com/maven/" } }
-
Declare the following dependency in your
build.gradle
filecompile 'com.pushtechnology.diffusion:diffusion-client:6.11.2'
-
To compile the Diffusion® Cloud Android APK, add the following to the
build.gradle
:compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
-
Add the
INTERNET
permission to yourAndroidManifest.xml
file:<uses-permission android:name="android.permission.INTERNET" />
-
.Net
- Install with .Net Cli
-
dotnet add package Diffusion.Client
- Install with NuGet
-
Install-Package Diffusion.Client
C
-
Download the latest version of the Diffusion® Cloud C SDK for your operating system:
-
Extract the contents of the zip archive into a folder named
diffusion
-
In your
cmake.in
file, add the following entry, editing the appropriate path to thediffusion
folder:add_library(diffusion STATIC IMPORTED) set_target_properties(diffusion PROPERTIES IMPORTED_LOCATION "<path/to/diffusion/folder>/lib/libdiffusion.a" INTERFACE_INCLUDE_DIRECTORIES "<path/to/diffusion/folder>/include" )
-
When linking dependencies to the libraries or executables of your solution, add
diffusion
to them:add_dependencies(<library/executable> ... diffusion ...) target_link_libraries(<library/executable> PRIVATE ... diffusion ...)