mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2025-12-21 13:30:11 -06:00
9 lines
349 B
Swift
9 lines
349 B
Swift
@objc(BackgroundFileReader)
|
|
class BackgroundFileReader: NSObject {
|
|
@objc func readBlobInBackground(_ blob: NSData, resolver: @escaping (String) -> Void, rejecter: @escaping (String) -> Void) {
|
|
DispatchQueue.global(qos: .background).async {
|
|
let base64String = blob.base64EncodedString(options: [])
|
|
resolver(base64String)
|
|
}
|
|
}
|
|
} |