Skip to content

Instantly share code, notes, and snippets.

View hellensoloviy's full-sized avatar

Hellen S. hellensoloviy

  • Kyiv
View GitHub Profile
@hellensoloviy
hellensoloviy / AssetExtractor.swift
Created February 2, 2026 12:58 — forked from fahied/AssetExtractor.swift
Get URL from Xcode asset catalogs
import UIKit
//It basically just gets image from assets, saves its data to disk and return file URL.
class AssetExtractor {
static func createLocalUrl(forImageNamed name: String) -> URL? {
let fileManager = FileManager.default
let cacheDirectory = fileManager.urls(for: .cachesDirectory, in: .userDomainMask)[0]
let url = cacheDirectory.appendingPathComponent("\(name).png")