Getting a client SDK

To begin distributing data with Diffusion®, you must use one of our SDKs (or REST API for Diffusion®). Diffusion SDKs provide a high-level interface to communicate with Diffusion® within your own applications.

Each SDK has accompanying API Documentation and code examples. You can also browse our Developer Hub for more resources.

JavaScript

Install with NPM
npm install diffusion
Install via Yarn
yarn add diffusion

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
  1. Add the DiffusionData™ public repository to your build.gradle file:

    repositories {
        maven {
            url "https://download.diffusiondata.com/maven/"
        }
    }
  2. Declare the following dependency in your build.gradle file

    compile 'com.pushtechnology.diffusion:diffusion-client:6.11.2'

Swift

Requirements
  • XCode 12.4 or higher

Install via Swift Package Manager
  1. Select FileSwift PackagesAdd Package Dependency

  2. Enter github.com/diffusiondata/diffusion-swift

Install via Package.swift
  • You can add Diffusion® 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
  1. Add the DiffusionData™ public repository to your build.gradle file:

    repositories {
        maven {
            url "https://download.diffusiondata.com/maven/"
        }
    }
  2. Declare the following dependency in your build.gradle file

    compile 'com.pushtechnology.diffusion:diffusion-client:6.11.2'
  3. To compile the Diffusion® Android APK, add the following to the build.gradle:

    compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
    }
  4. Add the INTERNET permission to your AndroidManifest.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

  1. Download the latest version of the Diffusion® C SDK for your operating system:

  2. Extract the contents of the zip archive into a folder named diffusion

  3. In your cmake.in file, add the following entry, editing the appropriate path to the diffusion 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"
    )
  4. 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 ...)

Python

Install via Pip
pip install diffusion==6.11.2