Skip to content

Commit b73da10

Browse files
committed
Add version 2.6.0
1 parent 729d5c9 commit b73da10

File tree

8 files changed

+92
-58
lines changed

8 files changed

+92
-58
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## [2.6.0]
2+
3+
### Changed
4+
5+
* 🚨 Bumped iOS deployment target to 13.0.
6+
* [video_editor_sdk] Raised minimum VideoEditor SDK for iOS version to 11.1.0. See the [changelog](https://github.com/imgly/vesdk-ios-build/blob/master/CHANGELOG.md) for more information.
7+
* [photo_editor_sdk] Raised minimum PhotoEditor SDK for iOS version to 11.1.0. See the [changelog](https://github.com/imgly/pesdk-ios-build/blob/master/CHANGELOG.md) for more information.
8+
9+
### Added
10+
11+
* [imgly_sdk] Added implementation and documentation for background removal.
12+
113
## [2.5.0]
214

315
### Added

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,20 @@
1717

1818
# Flutter plugin for VideoEditor SDK
1919

20+
## System requirements
21+
22+
- Flutter: 1.20.0
23+
- Dart: 2.12.0
24+
- iOS: 13
25+
- Android: 5 (SDK 21)
26+
2027
## Getting started
2128

2229
Add the plugin package to the `pubspec.yaml` file in your project:
2330

2431
```yaml
2532
dependencies:
26-
video_editor_sdk: ^2.5.0
33+
video_editor_sdk: ^2.6.0
2734
```
2835
2936
Install the new dependency:
@@ -187,6 +194,7 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
187194

188195
include 'backend:sticker-animated'
189196
include 'backend:sticker-smart'
197+
include 'backend:background-removal'
190198
}
191199
}
192200
```

example/ios/Flutter/AppFrameworkInfo.plist

+20-20
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>CFBundleDevelopmentRegion</key>
6-
<string>$(DEVELOPMENT_LANGUAGE)</string>
7-
<key>CFBundleExecutable</key>
8-
<string>App</string>
9-
<key>CFBundleIdentifier</key>
10-
<string>io.flutter.flutter.app</string>
11-
<key>CFBundleInfoDictionaryVersion</key>
12-
<string>6.0</string>
13-
<key>CFBundleName</key>
14-
<string>App</string>
15-
<key>CFBundlePackageType</key>
16-
<string>FMWK</string>
17-
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
19-
<key>CFBundleSignature</key>
20-
<string>????</string>
21-
<key>CFBundleVersion</key>
22-
<string>1.0</string>
23-
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>App</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>io.flutter.flutter.app</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>App</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1.0</string>
23+
<key>MinimumOSVersion</key>
24+
<string>13.0</string>
2525
</dict>
2626
</plist>

example/ios/Podfile.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- imgly_sdk (2.5.0):
3+
- imgly_sdk (2.6.0):
44
- Flutter
5-
- imglyKit (~> 10.30)
6-
- imglyKit (10.30.1)
7-
- video_editor_sdk (2.5.0):
5+
- imglyKit (~> 11.1)
6+
- imglyKit (11.2.0)
7+
- video_editor_sdk (2.6.0):
88
- Flutter
9-
- imgly_sdk
9+
- imgly_sdk (= 2.6.0)
1010

1111
DEPENDENCIES:
1212
- Flutter (from `Flutter`)
@@ -27,9 +27,9 @@ EXTERNAL SOURCES:
2727

2828
SPEC CHECKSUMS:
2929
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
30-
imgly_sdk: d8f93e1cbb33f6c27d0ab8f88ccceeeb819ca60d
31-
imglyKit: bb83829ba5d1af548772d61660556473f0391d1c
32-
video_editor_sdk: b7a26ee9ead44774e7fac73392a03f6907e3e8d3
30+
imgly_sdk: bb252939cfbf53a0199a40d565ab675db859a041
31+
imglyKit: 505785f0467867523cdee38ebb7d60c5189faedf
32+
video_editor_sdk: 2e8337c6604c6b5a8fc2f2b3f261a00da702b1b0
3333

3434
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
3535

example/ios/Runner.xcodeproj/project.pbxproj

+16-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 51;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -121,7 +121,6 @@
121121
97FD7ACF466A699F4B49E1FB /* Pods-Runner.release.xcconfig */,
122122
F6284CF52C570F48519CAE9A /* Pods-Runner.profile.xcconfig */,
123123
);
124-
name = Pods;
125124
path = Pods;
126125
sourceTree = "<group>";
127126
};
@@ -362,7 +361,11 @@
362361
"$(PROJECT_DIR)/Flutter",
363362
);
364363
INFOPLIST_FILE = Runner/Info.plist;
365-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
364+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
365+
LD_RUNPATH_SEARCH_PATHS = (
366+
"$(inherited)",
367+
"@executable_path/Frameworks",
368+
);
366369
LIBRARY_SEARCH_PATHS = (
367370
"$(inherited)",
368371
"$(PROJECT_DIR)/Flutter",
@@ -494,7 +497,11 @@
494497
"$(PROJECT_DIR)/Flutter",
495498
);
496499
INFOPLIST_FILE = Runner/Info.plist;
497-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
500+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
501+
LD_RUNPATH_SEARCH_PATHS = (
502+
"$(inherited)",
503+
"@executable_path/Frameworks",
504+
);
498505
LIBRARY_SEARCH_PATHS = (
499506
"$(inherited)",
500507
"$(PROJECT_DIR)/Flutter",
@@ -521,7 +528,11 @@
521528
"$(PROJECT_DIR)/Flutter",
522529
);
523530
INFOPLIST_FILE = Runner/Info.plist;
524-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
531+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
532+
LD_RUNPATH_SEARCH_PATHS = (
533+
"$(inherited)",
534+
"@executable_path/Frameworks",
535+
);
525536
LIBRARY_SEARCH_PATHS = (
526537
"$(inherited)",
527538
"$(PROJECT_DIR)/Flutter",

ios/Classes/FlutterVESDK.swift

+22-19
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ImglyKit
44
import imgly_sdk
55
import AVFoundation
66

7-
@available(iOS 9.0, *)
7+
@available(iOS 13.0, *)
88
public class FlutterVESDK: FlutterIMGLY, FlutterPlugin, VideoEditViewControllerDelegate {
99

1010
// MARK: - Typealias
@@ -111,7 +111,7 @@ public class FlutterVESDK: FlutterIMGLY, FlutterPlugin, VideoEditViewControllerD
111111
var videoEditViewController: VideoEditViewController
112112

113113
if let _serialization = serializationData {
114-
let deserializationResult = Deserializer.deserialize(data: _serialization, imageDimensions: video.size, assetCatalog: configurationData?.assetCatalog ?? .shared)
114+
let deserializationResult = Deserializer.deserialize(data: _serialization, imageDimensions: video.size, assetCatalog: configurationData?.assetCatalog ?? .defaultItems)
115115
photoEditModel = deserializationResult.model ?? photoEditModel
116116
}
117117

@@ -164,59 +164,62 @@ public class FlutterVESDK: FlutterIMGLY, FlutterPlugin, VideoEditViewControllerD
164164
return (nil, true)
165165
}
166166
}
167+
168+
private func handleError(_ videoEditViewController: VideoEditViewController, code: String, message: String?, details: Any?) {
169+
self.dismiss(mediaEditViewController: videoEditViewController, animated: true) {
170+
self.result?(FlutterError(code: code, message: message, details: details))
171+
self.result = nil
172+
}
173+
}
167174
}
168175

169-
@available(iOS 9.0, *)
176+
@available(iOS 13.0, *)
170177
extension FlutterVESDK {
171-
172178
/// Called if the video has been successfully exported.
173179
/// - Parameter videoEditViewController: The instance of `VideoEditViewController` that finished exporting
174-
/// - Parameter url: The `URL` where the video has been exported to.
175-
public func videoEditViewController(_ videoEditViewController: VideoEditViewController, didFinishWithVideoAt url: URL?) {
176-
180+
/// - Parameter result: The `VideoEditorResult` from the editor.
181+
public func videoEditViewControllerDidFinish(_ videoEditViewController: VideoEditViewController, result: VideoEditorResult) {
177182
var serialization: Any?
178183

179184
if self.serializationEnabled == true {
180185
guard let serializationData = videoEditViewController.serializedSettings else {
186+
self.handleError(videoEditViewController, code: "Serialization failed.", message: "No serialization data found.", details: nil)
181187
return
182188
}
183189
if self.serializationType == IMGLYConstants.kExportTypeFileURL {
184190
guard let exportURL = self.serializationFile else {
185-
self.result?(FlutterError(code: "Serialization failed.", message: "The URL must not be nil.", details: nil))
186-
self.result = nil
191+
self.handleError(videoEditViewController, code: "Serialization failed.", message: "The URL must not be nil.", details: nil)
187192
return
188193
}
189194
do {
190195
try serializationData.IMGLYwriteToUrl(exportURL, andCreateDirectoryIfNeeded: true)
191196
serialization = self.serializationFile?.absoluteString
192197
} catch let error {
193-
self.result?(FlutterError(code: "Serialization failed.", message: error.localizedDescription, details: error))
194-
self.result = nil
198+
self.handleError(videoEditViewController, code: "Serialization failed.", message: error.localizedDescription, details: error)
199+
return
195200
}
196201
} else if self.serializationType == IMGLYConstants.kExportTypeObject {
197202
do {
198203
serialization = try JSONSerialization.jsonObject(with: serializationData, options: .init(rawValue: 0))
199204
} catch let error {
200-
self.result?(FlutterError(code: "Serialization failed.", message: error.localizedDescription, details: error))
201-
self.result = nil
205+
self.handleError(videoEditViewController, code: "Serialization failed.", message: error.localizedDescription, details: error)
206+
return
202207
}
203208
}
204209
}
205210

206211
self.dismiss(mediaEditViewController: videoEditViewController, animated: true) {
207-
let res: [String: Any?] = ["video": url?.absoluteString, "hasChanges": videoEditViewController.hasChanges, "serialization": serialization]
212+
let res: [String: Any?] = ["video": result.output.url.absoluteString, "hasChanges": result.status == .renderedWithChanges, "serialization": serialization]
208213
self.result?(res)
209214
self.result = nil
210215
}
211216
}
212217

213218
/// Called if the `VideoEditViewController` failed to export the video.
214219
/// - Parameter videoEditViewController: The `VideoEditViewController` that failed to export the video.
215-
public func videoEditViewControllerDidFailToGenerateVideo(_ videoEditViewController: VideoEditViewController) {
216-
self.dismiss(mediaEditViewController: videoEditViewController, animated: true) {
217-
self.result?(FlutterError(code: "editor_failed", message: "The editor did fail to generate the video.", details: nil))
218-
self.result = nil
219-
}
220+
/// - Parameter error: The `VideoEditorError` that caused the failure.
221+
public func videoEditViewControllerDidFail(_ videoEditViewController: VideoEditViewController, error: VideoEditorError) {
222+
self.handleError(videoEditViewController, code: "Editor failed", message: "The editor did fail to generate the video.", details: error)
220223
}
221224

222225
/// Called if the `VideoEditViewController` was cancelled.

ios/video_editor_sdk.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ The official Flutter plugin for VideoEditor SDK. Integrate the video editor into
2020
s.source = { :path => '.' }
2121
s.source_files = 'Classes/**/*'
2222
s.dependency 'Flutter'
23-
s.platform = :ios, '9.0'
24-
s.dependency 'imgly_sdk'
23+
s.platform = :ios, '13.0'
24+
s.dependency 'imgly_sdk', s.version.to_s
2525

2626
# Flutter.framework does not contain a i386 slice.
2727
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
28-
s.swift_version = '5.0'
28+
s.swift_version = '5.6'
2929
end

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: video_editor_sdk
22
description: The official Flutter plugin for VideoEditor SDK. Integrate the video editor into your own iOS or Android app - in minutes!
3-
version: 2.5.0
3+
version: 2.6.0
44
homepage: https://www.videoeditorsdk.com
55
repository: https://github.com/imgly/vesdk-flutter
66

@@ -11,7 +11,7 @@ environment:
1111
dependencies:
1212
flutter:
1313
sdk: flutter
14-
imgly_sdk: 2.5.0
14+
imgly_sdk: 2.6.0
1515

1616
dev_dependencies:
1717
flutter_test:

0 commit comments

Comments
 (0)