Meshtastic-Apple/MeshtasticClient/Helpers/ChannelHelper.swift
Garth Vander Houwen 7b920aba1e 1.3 Updates
2022-06-06 22:24:35 -07:00

26 lines
635 B
Swift

//
// ChannelHelper.swift
// MeshtasticClient
//
// Created by Garth Vander Houwen on 6/6/22.
//
//import Foundation
//
//
//private fun urlToChannels(url: Uri): AppOnlyProtos.ChannelSet {
// val urlStr = url.toString()
//
// val pathRegex = Regex("$prefix(.*)", RegexOption.IGNORE_CASE)
// val (base64) = pathRegex.find(urlStr)?.destructured
// ?: throw MalformedURLException("Not a meshtastic URL: ${urlStr.take(40)}")
// val bytes = Base64.decode(base64, base64Flags)
//
// return AppOnlyProtos.ChannelSet.parseFrom(bytes)
// }
//
//func urlToChannels(url: URL) {
//
// let urlString = url.absoluteString
//
//}