Skip to content

Commit

Permalink
Add version 2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leontobias committed Jun 29, 2022
1 parent 729d5c9 commit b73da10
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 58 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## [2.6.0]

### Changed

* 🚨 Bumped iOS deployment target to 13.0.
* [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.
* [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.

### Added

* [imgly_sdk] Added implementation and documentation for background removal.

## [2.5.0]

### Added
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@

# Flutter plugin for VideoEditor SDK

## System requirements

- Flutter: 1.20.0
- Dart: 2.12.0
- iOS: 13
- Android: 5 (SDK 21)

## Getting started

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

```yaml
dependencies:
video_editor_sdk: ^2.5.0
video_editor_sdk: ^2.6.0
```
Install the new dependency:
Expand Down Expand Up @@ -187,6 +194,7 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug

include 'backend:sticker-animated'
include 'backend:sticker-smart'
include 'backend:background-removal'
}
}
```
Expand Down
40 changes: 20 additions & 20 deletions example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>13.0</string>
</dict>
</plist>
16 changes: 8 additions & 8 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- Flutter (1.0.0)
- imgly_sdk (2.5.0):
- imgly_sdk (2.6.0):
- Flutter
- imglyKit (~> 10.30)
- imglyKit (10.30.1)
- video_editor_sdk (2.5.0):
- imglyKit (~> 11.1)
- imglyKit (11.2.0)
- video_editor_sdk (2.6.0):
- Flutter
- imgly_sdk
- imgly_sdk (= 2.6.0)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -27,9 +27,9 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
imgly_sdk: d8f93e1cbb33f6c27d0ab8f88ccceeeb819ca60d
imglyKit: bb83829ba5d1af548772d61660556473f0391d1c
video_editor_sdk: b7a26ee9ead44774e7fac73392a03f6907e3e8d3
imgly_sdk: bb252939cfbf53a0199a40d565ab675db859a041
imglyKit: 505785f0467867523cdee38ebb7d60c5189faedf
video_editor_sdk: 2e8337c6604c6b5a8fc2f2b3f261a00da702b1b0

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c

Expand Down
21 changes: 16 additions & 5 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -121,7 +121,6 @@
97FD7ACF466A699F4B49E1FB /* Pods-Runner.release.xcconfig */,
F6284CF52C570F48519CAE9A /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -362,7 +361,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down Expand Up @@ -494,7 +497,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand All @@ -521,7 +528,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down
41 changes: 22 additions & 19 deletions ios/Classes/FlutterVESDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ImglyKit
import imgly_sdk
import AVFoundation

@available(iOS 9.0, *)
@available(iOS 13.0, *)
public class FlutterVESDK: FlutterIMGLY, FlutterPlugin, VideoEditViewControllerDelegate {

// MARK: - Typealias
Expand Down Expand Up @@ -111,7 +111,7 @@ public class FlutterVESDK: FlutterIMGLY, FlutterPlugin, VideoEditViewControllerD
var videoEditViewController: VideoEditViewController

if let _serialization = serializationData {
let deserializationResult = Deserializer.deserialize(data: _serialization, imageDimensions: video.size, assetCatalog: configurationData?.assetCatalog ?? .shared)
let deserializationResult = Deserializer.deserialize(data: _serialization, imageDimensions: video.size, assetCatalog: configurationData?.assetCatalog ?? .defaultItems)
photoEditModel = deserializationResult.model ?? photoEditModel
}

Expand Down Expand Up @@ -164,59 +164,62 @@ public class FlutterVESDK: FlutterIMGLY, FlutterPlugin, VideoEditViewControllerD
return (nil, true)
}
}

private func handleError(_ videoEditViewController: VideoEditViewController, code: String, message: String?, details: Any?) {
self.dismiss(mediaEditViewController: videoEditViewController, animated: true) {
self.result?(FlutterError(code: code, message: message, details: details))
self.result = nil
}
}
}

@available(iOS 9.0, *)
@available(iOS 13.0, *)
extension FlutterVESDK {

/// Called if the video has been successfully exported.
/// - Parameter videoEditViewController: The instance of `VideoEditViewController` that finished exporting
/// - Parameter url: The `URL` where the video has been exported to.
public func videoEditViewController(_ videoEditViewController: VideoEditViewController, didFinishWithVideoAt url: URL?) {

/// - Parameter result: The `VideoEditorResult` from the editor.
public func videoEditViewControllerDidFinish(_ videoEditViewController: VideoEditViewController, result: VideoEditorResult) {
var serialization: Any?

if self.serializationEnabled == true {
guard let serializationData = videoEditViewController.serializedSettings else {
self.handleError(videoEditViewController, code: "Serialization failed.", message: "No serialization data found.", details: nil)
return
}
if self.serializationType == IMGLYConstants.kExportTypeFileURL {
guard let exportURL = self.serializationFile else {
self.result?(FlutterError(code: "Serialization failed.", message: "The URL must not be nil.", details: nil))
self.result = nil
self.handleError(videoEditViewController, code: "Serialization failed.", message: "The URL must not be nil.", details: nil)
return
}
do {
try serializationData.IMGLYwriteToUrl(exportURL, andCreateDirectoryIfNeeded: true)
serialization = self.serializationFile?.absoluteString
} catch let error {
self.result?(FlutterError(code: "Serialization failed.", message: error.localizedDescription, details: error))
self.result = nil
self.handleError(videoEditViewController, code: "Serialization failed.", message: error.localizedDescription, details: error)
return
}
} else if self.serializationType == IMGLYConstants.kExportTypeObject {
do {
serialization = try JSONSerialization.jsonObject(with: serializationData, options: .init(rawValue: 0))
} catch let error {
self.result?(FlutterError(code: "Serialization failed.", message: error.localizedDescription, details: error))
self.result = nil
self.handleError(videoEditViewController, code: "Serialization failed.", message: error.localizedDescription, details: error)
return
}
}
}

self.dismiss(mediaEditViewController: videoEditViewController, animated: true) {
let res: [String: Any?] = ["video": url?.absoluteString, "hasChanges": videoEditViewController.hasChanges, "serialization": serialization]
let res: [String: Any?] = ["video": result.output.url.absoluteString, "hasChanges": result.status == .renderedWithChanges, "serialization": serialization]
self.result?(res)
self.result = nil
}
}

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

/// Called if the `VideoEditViewController` was cancelled.
Expand Down
6 changes: 3 additions & 3 deletions ios/video_editor_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ The official Flutter plugin for VideoEditor SDK. Integrate the video editor into
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
s.dependency 'imgly_sdk'
s.platform = :ios, '13.0'
s.dependency 'imgly_sdk', s.version.to_s

# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'
s.swift_version = '5.6'
end
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: video_editor_sdk
description: The official Flutter plugin for VideoEditor SDK. Integrate the video editor into your own iOS or Android app - in minutes!
version: 2.5.0
version: 2.6.0
homepage: https://www.videoeditorsdk.com
repository: https://github.com/imgly/vesdk-flutter

Expand All @@ -11,7 +11,7 @@ environment:
dependencies:
flutter:
sdk: flutter
imgly_sdk: 2.5.0
imgly_sdk: 2.6.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit b73da10

Please sign in to comment.