Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-photoeditorsdk

Package Overview
Dependencies
Maintainers
8
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-photoeditorsdk

A Cordova plugin for PhotoEditor SDK. Integrate the photo editor into your own HTML5, iOS or Android app - in minutes!

  • 3.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
8
Weekly downloads
 
Created
Source

PhotoEditor SDK Logo

NPM version Platform support Twitter

Cordova & Ionic plugin for PhotoEditor SDK

Getting started

Add PhotoEditor SDK plugin to your project as follows:

cordova plugin add cordova-plugin-photoeditorsdk

Known Issues

With version 3.2.0, we recommend using compileSdkVersion not lower than 31 for Android. However, this might interfere with your application's Android Gradle Plugin version if this is set to 4.x.

If you don't use a newer Android Gradle Plugin version, you'll most likely encounter a build error similar to:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':cordova-plugin-photoeditorsdk'.
> com.android.builder.errors.EvalIssueException: Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

As a workaround you can create the following symlinks:

  1. Inside /Users/YOUR-USERNAME/Library/Android/sdk/build-tools/31.0.0/: Create a dx symlink for the d8 file with ln -s d8 dx.
  2. From there, go to ./lib/ and create a dx.jar symlink for the d8.jar file with ln -s d8.jar dx.jar.

Android

Version

You can configure the native Android PhotoEditor SDK version used by creating a imglyConfig.json file and specifying a specific version:

{
  "version": "10.3.3"
}

If no version / no configuration file is specified, the module will use the default minimum required version.

AndroidX

From version 3.0.0 the plugin uses AndroidX. To enable AndroidX in your application please adjust your config.xml:

<platform name="android">
...
+    <preference name="AndroidXEnabled" value="true" />
...
</platform>

If your application is using legacy Android Support Libraries you can use the cordova-plugin-androidx-adapter which will migrate the legacy libraries to work with AndroidX.

Kotlin Version

If you are using cordova-android version 10.0+, you might need to adjust the Kotlin version of your application in your config.xml, if your current Kotlin version is not compatible with our plugin:

<platform name="android">
...
+    <preference name="GradlePluginKotlinVersion" value="1.5.32" />
...
</platform>
Supported Android versions

With version 3.2.0 the plugin requires minSdkVersion 21 or higher. Depending on your cordova-android version you might need to raise the minSdkVersion manually. For this, please add the following entry to your config.xml:

<platform name="android">
...
+    <preference name="android-minSdkVersion" value="21" />
...
</platform>

We further recommend you to update your buildToolsVersion to 31.0.0 as well as your compileSdkVersion to 31. However, this is not mandatory. For further reference on how to update these variables, please refer to the official Cordova documentation.

Modules

You can configure the modules used for the PhotoEditor SDK for Android by opening imglyConfig.gradle and removing / commenting out the modules you do not need. This will also reduce the size of your application.

Because PhotoEditor SDK for Android with all its modules is quite large, there is a high chance that you will need to enable Multidex for your project as follows:

cordova plugin add cordova-plugin-enable-multidex

Usage

Each platform requires a separate license file. Unlock PhotoEditor SDK with a single line of code for both platforms via platform-specific file extensions.

Rename your license files:

  • Android license: ANY_NAME.android
  • iOS license: ANY_NAME.ios

Pass the file path without the extension to the unlockWithLicense function to unlock both iOS and Android:

PESDK.unlockWithLicense("www/assets/ANY_NAME");

Open the editor with an image:

PESDK.openEditor(
  successCallback,
  failureCallback,
  PESDK.resolveStaticResource("www/assets/image.jpg")
);

Please see the code documentation for more details and additional customization and configuration options.

Notes for Ionic framework
  • Add this line above your class to be able to use PESDK.
    declare var PESDK;
    
  • Ionic will generate a www folder that will contain your compiled code and your assets. In order to pass resources to PhotoEditor SDK you need to use this folder.

Example

Please see our example project which demonstrates how to use the Cordova plugin for PhotoEditor SDK.

License Terms

Make sure you have a commercial license for PhotoEditor SDK before releasing your app. A commercial license is required for any app or service that has any form of monetization: This includes free apps with in-app purchases or ad supported applications. Please contact us if you want to purchase the commercial license.

Support and License

Use our service desk for bug reports or support requests. To request a commercial license, please use the license request form on our website.

Keywords

FAQs

Package last updated on 18 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc