Swiftpack.co - heestand-xyz/AssetManager as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by heestand-xyz.
heestand-xyz/AssetManager 1.5.2
Import, export and share files on iOS and macOS
⭐️ 1
🕓 2 weeks ago
iOS macOS
.package(url: "https://github.com/heestand-xyz/AssetManager.git", from: "1.5.2")

Asset Manager

Import, export and share files on iOS and macOS

Install

.package(url: "https://github.com/heestand-xyz/AssetManager", from: "1.0.1"),

Setup

import SwiftUI
import AssetManager

@main
struct RenderApp: App {
    
    @StateObject private var assetManager = AMAssetManager()

    var body: some Scene {
        WindowGroup {
            ContentView(assetManager: assetManager)
                .asset(manager: assetManager)
        }
    }
}

Usage

import SwiftUI
import AssetManager

struct ContentView: View {
    
    @ObservedObject var assetManager: AMAssetManager

    var body: some View {
        Button {
            assetManager.importMedia(from: .photos) { result in
                // Access imported media
            }
        } label: {
            Text("Import")
        }   
    }
}

GitHub

link
Stars: 1
Last commit: 2 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics