Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Your starting point for using the Creative SDK PhoneGap plugins!

License

Notifications You must be signed in to change notification settings

CreativeSDK/phonegap-plugin-csdk-client-auth

Repository files navigation

phonegap-plugin-csdk-client-auth

Stories in Ready

Welcome to your first stop on the way to integrating the Adobe Creative SDK into your PhoneGap app!

Client Auth is required for all Creative SDK integrations. See the information below for info on using this Client Auth plugin.

Contents

Prerequisites

Supported PhoneGap platforms

  1. Android
  2. iOS

Registering for a Client ID and Secret

Before you can work with the Creative SDK, you must register your application and get your Client ID and Client Secret.

Note: You need a Client ID and Secret for each platform you plan to use. If you plan to ship for both Android and iOS, you will need an ID/Secret pair for both platforms.

For details, see Registering Your Application.

Software requirements

iOS

  • Xcode 7 or higher
  • iOS 8.2 or higher

See the Creative SDK Getting Started guide for further details.

Android

  • Android Studio 2.0 or higher
  • Android SDK 16 or higher

See the Creative SDK Getting Started guide for further details.

Installation

Adding the plugin

Use the command below to add the plugin to your app. If you only plan to ship on one platform, you can use dummy values for the Client ID and Secret variables for the platform you don't need.

Note: be sure to replace the Client ID and Secret strings with the values you received from the Creative SDK site (see "Registering for a Client ID and Secret" above).

Adding released version

phonegap plugin add --save phonegap-plugin-csdk-client-auth \
  --variable CSDK_CLIENT_ID_IOS="iOS Client ID" \
  --variable CSDK_CLIENT_SECRET_IOS="iOS Secret" \
  --variable CSDK_CLIENT_ID_ANDROID="Android Client ID" \
  --variable CSDK_CLIENT_SECRET_ANDROID="Android Secret"

Adding development version

phonegap plugin add --save https://github.com/CreativeSDK/phonegap-plugin-csdk-client-auth \
  --variable CSDK_CLIENT_ID_IOS="iOS Client ID" \
  --variable CSDK_CLIENT_SECRET_IOS="iOS Secret" \
  --variable CSDK_CLIENT_ID_ANDROID="Android Client ID" \
  --variable CSDK_CLIENT_SECRET_ANDROID="Android Secret"

Downloading the Creative SDK

iOS

To get the iOS SDK, go to the Downloads page, click the download link for STATIC FRAMEWORKS (DEPRECATED), and extract it to the src/ios folder of this plugin. Extracting the ZIP will create an AdobeCreativeSDKFrameworks folder.

The ZIP files contain all the frameworks in the Creative SDK, but for this plugin we will only be using the AdobeCreativeSDKCore.framework.

Android

No action is required for Android. The Creative SDK for Android is delivered as a remote Maven repository, and the required framework will be downloaded automatically by the plugin.

Setup guide

  1. Create a new PhoneGap app or cd into an existing one
  2. Add this plugin (see "Adding the plugin" above)
  3. iOS only: download and add the Creative SDK to this project's plugins/phonegap-plugin-csdk-client-auth/src/ios directory (see "Downloading the Creative SDK" above)
  4. Add your target PhoneGap platform
  5. Build and run for your platform

Api Guide

There is no JavaScript API for this plugin. All Client Auth code is added to your app automatically.

If you need to update your Creative SDK Client ID and Secret, or add a new ID and Secret for a new platform, you can do that in your app's config.xml file.

The Client ID and Secret pairs are stored like this in config.xml:

<plugin name="phonegap-plugin-csdk-client-auth" spec="~1.0.0">
        <variable name="CSDK_CLIENT_ID_IOS" value="iOS Client ID" />
        <variable name="CSDK_CLIENT_ID_ANDROID" value="Android Client ID" />
        <variable name="CSDK_CLIENT_SECRET_IOS" value="iOS Secret" />
        <variable name="CSDK_CLIENT_SECRET_ANDROID" value="Android Secret" />
</plugin>

About

Your starting point for using the Creative SDK PhoneGap plugins!

Resources

License

Stars

Watchers

Forks

Packages

No packages published