Skip to content

Latest commit

 

History

History
112 lines (88 loc) · 3.39 KB

install.md

File metadata and controls

112 lines (88 loc) · 3.39 KB

Getting started

A working project can be found in the the example app.

No npm package yet...

npm install react-native-image-tools@https://github.com/npomfret/react-native-image-tools.git --save
react-native link react-native-image-tools

(Optional) Get your Adobe ID key (client id, secret key and redirect url) for the Abode Creative SDK from abobe.io. It will work without it, but you will get a pop up warning when the image editor is launched. Before releasing your app you will need to submit your app to Adobe for review.

For iOS

(official docs here)

  • Download the Adobe Creative SDK for iOS.
  • Create a folder called Frameworks at the root of your iOS project and copy AdobeCreativeSDKImage.framework and AdobeCreativeSDKCore.framework to it
  • in xCode:
    • under General > Embeded Binaries, click +, click Add Other, browse to the frameworks directory and add them both
    • under Build Settings > Framework Search Paths add $(PROJECT_DIR)/Frameworks
    • under Build Phases > click +, click New Run Script Phase (note that the order of the build phases is crucial; this Run Script phase must come after the Embed Frameworks phase), add this text: ${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AdobeCreativeSDKCore.framework/strip-frameworks.sh
    • clean and build

For Android

(official docs here)

  • Add some maven repos to your root level build.gradle:
 allprojects {
     repositories {
         ...
         maven {
             url 'https://repo.adobe.com/nexus/content/repositories/releases/'
         }
         maven {
             url 'http://maven.localytics.com/public'
         }
     }
 }
  • To your app build.gradle, add the following:
android {
  ...
  defaultConfig {
    ...
    manifestPlaceholders = [appPackageName: "${applicationId}"]
    multiDexEnabled true    
  }

  dexOptions {
    jumboMode true
    javaMaxHeapSize "4g"
  }

  dependencies {
    compile 'com.android.support:multidex:1.0.1'
    ...
  }
}
  • To your MainApplication.java add:

...
import com.adobe.creativesdk.foundation.AdobeCSDKFoundation;
import com.adobe.creativesdk.foundation.auth.IAdobeAuthClientCredentials;
...

//add IAdobeAuthClientCredentials to the implements list
public class MainApplication extends Application implements ReactApplication, IAdobeAuthClientCredentials  {
    ...
    
    @Override
    public void onCreate() {
        ...
        MultiDex.install(getBaseContext());
        AdobeCSDKFoundation.initializeCSDKFoundation(getApplicationContext());
        ...
    }

    @Override
    public String getClientID() {
        return "your client id here";
    }

    @Override
    public String getClientSecret() {
        return "your client secret here";
    }

    @Override
    public String getRedirectURI() {
        return "your client redirect here";
    }

    @Override
    public String[] getAdditionalScopesList() {
        return new String[]{"email", "profile", "address"};
    }
}