VideoEditorKit is a Swift Package with an example iOS app. It is not yet a
fully decomposed SDK made of pure layout, player, and export engines.
Package.swift
Sources/VideoEditorKit/
Tests/VideoEditorKitTests/
Example/VideoEditor/
Example/VideoEditorTests/
Example/VideoEditor.xcworkspace
VideoEditorViewis the main public editor surface.EditorViewModelowns most editing state.VideoPlayerManagerowns playback and preview coordination.- Export and save rendering still live in helper/model code rather than a standalone export engine.
- The example app owns project persistence, sharing, and saved-project UI.
- Host passes a local file URL or a
VideoEditorSession. - The editor loads the source video.
- The editor applies any saved
VideoEditingConfiguration.
- User changes tools in the editor.
- The editor tracks unsaved changes against the last saved snapshot.
- Preview updates through player, canvas, transcript, and tool state.
- User taps Save.
- Editor renders an edited copy.
onSavedVideoreturns the saved edited video and configuration.- The host persists the edited copy separately from the original.
- User selects an export quality.
- Pending edits are saved first when needed.
- Export renders the chosen output.
onExportedVideoURLreturns the exported file.
Watermarks are applied as a final export render stage. They do not alter preview,
manual save, saved thumbnails, or VideoEditingConfiguration.
- Public editor:
Sources/VideoEditorKit/Views/Editor/VideoEditorView.swift - Editor state:
Sources/VideoEditorKit/Internal/ViewModels/EditorViewModel.swift - Player:
Sources/VideoEditorKit/Internal/Managers/Player/VideoPlayerManager.swift - Export:
Sources/VideoEditorKit/Internal/Models/Enums/VideoEditor.swift - Manual save:
Sources/VideoEditorKit/Internal/Editing/VideoEditorManualSaveRenderer.swift - Canvas:
Sources/VideoEditorKit/Canvas/ - Canvas gestures:
Sources/VideoEditorKit/Internal/Gestures/ - Example projects:
Example/VideoEditor/Data/Projects/
- Use
SwiftUIas the UI-facing framework import throughout package, example, and UI tests. - Do not import
UIKitdirectly in Swift files, including SwiftUI views, gesture bridges, helpers, and tests. iOS platform types that are available through SwiftUI should be referenced withimport SwiftUIonly. - Keep any platform interop isolated behind SwiftUI-facing APIs so callers do not need UIKit imports.
The package exposes VideoEditingConfiguration as the resumable edit state.
The example app persists:
- original copied video filename
- saved edited video filename
- exported video filename, when present
- creation date
- trim, speed, rotation, mirror, adjustments, frame, audio, and canvas state
- project thumbnail data
- Do not assume preview equals export for every feature.
- Do not assume export jobs are isolated in a pure engine.
- Do not assume export can handle every freeform crop path.
- Do not assume concurrent export is globally guarded.
- Do not assume the export input snapshot is immutable.