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.
- Android
- iOS
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.
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.
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).
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"
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"
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.
- Create a new PhoneGap app or
cd
into an existing one - Add this plugin (see "Adding the plugin" above)
- 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) - Add your target PhoneGap platform
- Build and run for your platform
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>