Skip to content

Commit 798c02c

Browse files
committed
Add version 2.1.0
1 parent 9e9c263 commit 798c02c

File tree

8 files changed

+149
-108
lines changed

8 files changed

+149
-108
lines changed

CHANGELOG.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,54 @@
1+
## [2.1.0]
2+
3+
### Changed
4+
5+
* [iOS] Updated VideoEditor SDK for iOS to version 10.7.0 and above.
6+
7+
### Fixed
8+
9+
* [iOS] Fixed automatic (CocoaPods) installation process so that VideoEditor SDK and PhotoEditor SDK can be used in the same project.
10+
* [iOS] Fixed `FRAMEWORK_SEARCH_PATHS` for manual linking VideoEditor SDK which is required for React Native versions older than 0.60.
11+
* Add missing `Platform` import when using React Native versions older than 0.60.
12+
113
## [2.0.1]
214

315
### Fixed
4-
* Package size is to big
5-
* "tools: replace" attribute that is linked to the "provider" element type is not bound.
16+
17+
* [Android] Fixed error message: "tools: replace" attribute that is linked to the "provider" element type is not bound.
618

719
## [2.0.0]
820

921
### Added
1022

11-
* Added support for PhotoEditor SDK Android version 7.1.4 and above.
23+
* [Android] Added support for VideoEditor SDK for Android version 7.1.5 and above.
1224

1325
## [1.3.0]
1426

1527
### Changed
1628

17-
* Updated VideoEditor SDK for iOS to version 10.6.0.
29+
* [iOS] Updated VideoEditor SDK for iOS to version 10.6.0.
1830

1931
## [1.2.0]
2032

2133
### Changed
2234

23-
* Updated VideoEditor SDK for iOS to version 10.5.0.
35+
* [iOS] Updated VideoEditor SDK for iOS to version 10.5.0.
2436

2537
## [1.1.0]
2638

2739
### Added
2840

29-
* Updated VideoEditor SDK for iOS to version 10.4.0.
41+
* [iOS] Updated VideoEditor SDK for iOS to version 10.4.0.
3042
* Added configuration options for personal stickers.
3143

3244
## [1.0.2]
3345

3446
### Fixed
3547

36-
* Fixed `unlockWithLicense`.
48+
* [iOS] Fixed `unlockWithLicense`.
3749

3850
## [1.0.0]
3951

4052
### Added
4153

42-
* Initial release of the React Native module for VideoEditor SDK. This version adds support for iOS only. Android support will be added in a later release.
54+
* [iOS] Initial release of the React Native module for VideoEditor SDK. This version adds support for iOS only. Android support will be added in a later release.

README.md

Lines changed: 90 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -14,94 +14,108 @@
1414

1515
# React Native module for VideoEditor SDK
1616

17-
## Prepare the Android project (this step is Android only)
18-
19-
### 1. Because the Android Editor SDK implementation is quite large, there is a high chance that you will need to enable Multidex.
20-
#### 1.1. Open the android/app/build.gradle file (not android/build.gradle) and put these lines at the end of the file:
21-
```groovy
22-
android {
23-
defaultConfig {
24-
multiDexEnabled true
25-
}
26-
}
27-
dependencies {
28-
implementation 'androidx.multidex:multidex:2.0.1'
29-
}
30-
```
31-
#### 1.2. You also need to change the _app/src/main/java/.../MainApplication.java_ file inside your project.
32-
Change the `extends` of your `MainApplication` class from `Application` to `androidx.multidex.MultiDexApplication`.
17+
## Getting started
3318

34-
```java
35-
public class MainApplication extends androidx.multidex.MultiDexApplication implements ReactApplication { ...
19+
Install the React Native module in your project as follows:
20+
21+
```sh
22+
yarn add react-native-videoeditorsdk
3623
```
3724

38-
For more information about what Multidex is, have a look here: https://developer.android.com/studio/build/multidex
39-
40-
### 2. Add the img.ly Repository and Plugin. Open the _android/build.gradle_ file (not android/app/build.gradle) and add these lines at the top of the file:
41-
```groovy
42-
buildscript {
43-
repositories {
44-
jcenter()
45-
maven { url "https://plugins.gradle.org/m2/" }
46-
maven { url "https://artifactory.img.ly/artifactory/imgly" }
47-
}
48-
49-
dependencies {
50-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
51-
classpath 'ly.img.android.sdk:plugin:7.1.5'
52-
}
53-
}
25+
### iOS
26+
27+
For React Native 0.60 and above [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) is used and VideoEditor SDK for iOS should be automatically installed:
28+
29+
```sh
30+
cd ios && pod install && cd ..
5431
```
5532

56-
3. Open the `android/app/build.gradle`file _(not android/build.gradle)_.
57-
And add these lines under `apply plugin: "com.android.application"`
58-
```groovy
59-
apply plugin: "com.android.application"
60-
61-
apply plugin: 'ly.img.android.sdk'
62-
apply plugin: 'kotlin-android'
63-
64-
// Comment out the modules you don't need, to save size.
65-
imglyConfig {
66-
modules {
67-
include 'ui:text'
68-
include 'ui:focus'
69-
include 'ui:frame'
70-
include 'ui:brush'
71-
include 'ui:filter'
72-
include 'ui:sticker'
73-
include 'ui:overlay'
74-
include 'ui:transform'
75-
include 'ui:adjustment'
76-
include 'ui:text-design'
77-
include 'ui:video-trim'
78-
79-
// This module is big, remove the serializer if you don't need that feature.
80-
include 'backend:serializer'
81-
82-
// Remove the asset packs you don't need, these are also big in size.
83-
include 'assets:font-basic'
84-
include 'assets:frame-basic'
85-
include 'assets:filter-basic'
86-
include 'assets:overlay-basic'
87-
include 'assets:sticker-shapes'
88-
include 'assets:sticker-emoticons'
89-
}
90-
}
33+
and updated:
34+
35+
```sh
36+
cd ios && pod update && cd ..
9137
```
9238

93-
## Getting started
39+
with CocoaPods.
9440

95-
Install the module with [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) as follows:
41+
For older React Native versions autolinking is not available and VideoEditor SDK for iOS needs to be [manually integrated](https://docs.videoeditorsdk.com/guides/ios/v10/introduction/getting_started#manually) in your Xcode project if you don't use [CocoaPods to manage your dependencies](https://facebook.github.io/react-native/docs/0.59/integration-with-existing-apps#configuring-cocoapods-dependencies). Make sure to put `ImglyKit.framework` and `VideoEditorSDK.framework` in the `ios/` directory of your project. Finally, [link the native dependencies](https://facebook.github.io/react-native/docs/0.59/linking-libraries-ios#step-2) with:
9642

9743
```sh
98-
# install
99-
yarn add react-native-videoeditorsdk
100-
cd ios && pod install && cd .. # CocoaPods on iOS needs this extra step
101-
# run
102-
yarn react-native run-ios
44+
yarn react-native link
10345
```
10446

47+
### Android
48+
49+
1. Because VideoEditor SDK for Android is quite large, there is a high chance that you will need to enable [Multidex](https://developer.android.com/studio/build/multidex) for your project as follows:
50+
51+
1. Open the `android/app/build.gradle` file (**not** `android/build.gradle`) and add these lines at the end:
52+
```groovy
53+
android {
54+
defaultConfig {
55+
multiDexEnabled true
56+
}
57+
}
58+
dependencies {
59+
implementation 'androidx.multidex:multidex:2.0.1'
60+
}
61+
```
62+
2. Open the `android/app/src/main/java/.../MainApplication.java` file and change the superclass of your `MainApplication` class from `Application` to `androidx.multidex.MultiDexApplication`, e.g.:
63+
```java
64+
public class MainApplication extends androidx.multidex.MultiDexApplication implements ReactApplication {
65+
```
66+
67+
2. Add the img.ly repository and plugin by opening the `android/build.gradle` file (**not** `android/app/build.gradle`) and adding these lines at the top:
68+
```groovy
69+
buildscript {
70+
repositories {
71+
jcenter()
72+
maven { url "https://plugins.gradle.org/m2/" }
73+
maven { url "https://artifactory.img.ly/artifactory/imgly" }
74+
}
75+
dependencies {
76+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
77+
classpath 'ly.img.android.sdk:plugin:7.1.5'
78+
}
79+
}
80+
```
81+
In order to update VideoEditor SDK for Android replace the version string `7.1.5` with a [newer release](https://github.com/imgly/vesdk-android-demo/releases).
82+
83+
3. Configure VideoEditor SDK for Android by opening the `android/app/build.gradle` file (**not** `android/build.gradle`) and adding the following lines under `apply plugin: "com.android.application"`:
84+
```groovy
85+
apply plugin: 'ly.img.android.sdk'
86+
apply plugin: 'kotlin-android'
87+
88+
// Comment out the modules you don't need, to save size.
89+
imglyConfig {
90+
modules {
91+
include 'ui:text'
92+
include 'ui:focus'
93+
include 'ui:frame'
94+
include 'ui:brush'
95+
include 'ui:filter'
96+
include 'ui:sticker'
97+
include 'ui:overlay'
98+
include 'ui:transform'
99+
include 'ui:adjustment'
100+
include 'ui:text-design'
101+
include 'ui:video-trim'
102+
103+
// This module is big, remove the serializer if you don't need that feature.
104+
include 'backend:serializer'
105+
106+
// Remove the asset packs you don't need, these are also big in size.
107+
include 'assets:font-basic'
108+
include 'assets:frame-basic'
109+
include 'assets:filter-basic'
110+
include 'assets:overlay-basic'
111+
include 'assets:sticker-shapes'
112+
include 'assets:sticker-emoticons'
113+
}
114+
}
115+
```
116+
117+
### Usage
118+
105119
Import the module in your `App.js`:
106120

107121
```js

RNVideoEditorSDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
1717

1818
s.dependency 'React'
1919
s.dependency 'React-RCTImage'
20-
s.dependency 'VideoEditorSDK', '10.6.0'
20+
s.dependency 'VideoEditorSDK', '~> 10.7'
2121
end

configuration.ts

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface Configuration {
1717
* The transform tool will only be presented if the image does not already fit one of the allowed
1818
* aspect ratios. It will be presented automatically, if the user changes the orientation of the asset
1919
* and the result does not match an allowed aspect ratio.
20-
*
20+
*
2121
* This property has no effect unless `transform.allowFreeCrop` is set to `false` or `null`.
2222
* @example // Defaults to:
2323
* false
@@ -77,7 +77,7 @@ export interface Configuration {
7777
*/
7878
snapToVerticalCenter?: boolean;
7979
/**
80-
* The left side of a sprite's bounding box snaps to a vertical line which is shifted
80+
* The left side of a sprite's bounding box snaps to a vertical line which is shifted
8181
* from the left side of the edited image towards its center by this value. The value is measured in normalized
8282
* coordinates relative to the smaller side of the edited image.
8383
* If this value is explicitly set to `null` this snapping line is disabled.
@@ -86,7 +86,7 @@ export interface Configuration {
8686
*/
8787
snapToLeft?: number | null;
8888
/**
89-
* The right side of a sprite's bounding box snaps to a vertical line which is shifted
89+
* The right side of a sprite's bounding box snaps to a vertical line which is shifted
9090
* from the right side of the edited image towards its center by this value. The value is measured in normalized
9191
* coordinates relative to the smaller side of the edited image.
9292
* If this value is explicitly set to `null` this snapping line is disabled.
@@ -95,7 +95,7 @@ export interface Configuration {
9595
*/
9696
snapToRight?: number | null;
9797
/**
98-
* The top side of a sprite's bounding box snaps to a horizontal line which is shifted
98+
* The top side of a sprite's bounding box snaps to a horizontal line which is shifted
9999
* from the top side of the edited image towards its center by this value. The value is measured in normalized
100100
* coordinates relative to the smaller side of the edited image.
101101
* If this value is explicitly set to `null` this snapping line is disabled.
@@ -104,7 +104,7 @@ export interface Configuration {
104104
*/
105105
snapToTop?: number | null;
106106
/**
107-
* The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted
107+
* The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted
108108
* from the bottom side of the edited image towards its center by this value. The value is measured in normalized
109109
* coordinates relative to the smaller side of the edited image.
110110
* If this value is explicitly set to `null` this snapping line is disabled.
@@ -446,9 +446,9 @@ export interface Configuration {
446446
canvasActions?: Array<
447447
CanvasAction.UNDO |
448448
CanvasAction.REDO |
449-
CanvasAction.DELETE |
450-
CanvasAction.BRING_TO_FRONT |
451-
CanvasAction.ADD |
449+
CanvasAction.DELETE |
450+
CanvasAction.BRING_TO_FRONT |
451+
CanvasAction.ADD |
452452
CanvasAction.FLIP
453453
>;
454454
/**
@@ -535,7 +535,7 @@ export interface Configuration {
535535
* { color: [0.80, 1.00, 0.40, 1], name: "Olive" },
536536
* { color: [0.33, 1.00, 0.53, 1], name: "Green" },
537537
* { color: [0.33, 1.00, 0.92, 1], name: "Aquamarin" },
538-
* ]
538+
* ]
539539
*/
540540
textColors?: ColorPalette;
541541
/**
@@ -630,7 +630,7 @@ export interface Configuration {
630630
* { color: [0.80, 1.00, 0.40, 1], name: "Olive" },
631631
* { color: [0.33, 1.00, 0.53, 1], name: "Green" },
632632
* { color: [0.33, 1.00, 0.92, 1], name: "Aquamarin" },
633-
* ]
633+
* ]
634634
*/
635635
colors?: ColorPalette;
636636
}
@@ -789,7 +789,7 @@ export interface Configuration {
789789
*/
790790
image?: {
791791
/**
792-
*
792+
* The image export type.
793793
* @example // Defaults to:
794794
* ImageExportType.FILE_URL
795795
*/
@@ -860,7 +860,7 @@ export interface Configuration {
860860
*/
861861
enabled?: boolean;
862862
/**
863-
*
863+
* The serialization export type.
864864
* @example // Defaults to:
865865
* SerializationExportType.FILE_URL
866866
*/
@@ -887,6 +887,9 @@ export interface Configuration {
887887

888888
/**
889889
* Defines the theme that should be used to style the user interface.
890+
* @note This runtime theming configuration is currently not supported on Android.
891+
* Please use the compile-time theming configuration instead:
892+
* https://docs.photoeditorsdk.com/guides/android/v7_1/customization/themes#color-theming
890893
* @example // Defaults to:
891894
* ExistingTheme.DARK
892895
*/
@@ -900,6 +903,9 @@ export interface Configuration {
900903
* Theming options to change the user interface appearance. This allows to alter predefined existing
901904
* theme presets or to create new themes which can be enabled when their corresponding key (name)
902905
* is set as the `Configuration.theme`.
906+
* @note This runtime theming configuration is currently not supported on Android.
907+
* Please use the compile-time theming configuration instead:
908+
* https://docs.photoeditorsdk.com/guides/android/v7_1/customization/themes#color-theming
903909
*/
904910
themes?: {
905911
[key: string]: Theme;
@@ -1128,7 +1134,7 @@ export interface CropRatio {
11281134
/** A unique identifiable item. */
11291135
export interface UniqueItem {
11301136
/** A unqiue string that makes the item unique identifiable. */
1131-
identifier: string;
1137+
identifier: string;
11321138
}
11331139

11341140
/** An existing item. */
@@ -1143,7 +1149,7 @@ export interface NamedItem extends UniqueItem {
11431149
/** An existing filter category. */
11441150
export interface ExistingFilterCategory extends ExistingItem {
11451151
/**
1146-
* Items of the category which can be existing or new defined filters.
1152+
* Items of the category which can be existing or new defined filters.
11471153
* If `null` the referenced existing category will keep its predefined items.
11481154
* @example // Defaults to:
11491155
* null
@@ -1189,7 +1195,7 @@ export interface DuoToneFilter extends NamedItem {
11891195
/** An existing sticker category. */
11901196
export interface ExistingStickerCategory extends ExistingItem {
11911197
/**
1192-
* Items of the category which can be existing or new defined stickers.
1198+
* Items of the category which can be existing or new defined stickers.
11931199
* If `null` the referenced existing category will keep its predefined items.
11941200
* @example // Defaults to:
11951201
* null

0 commit comments

Comments
 (0)