mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
26 lines
634 B
Swift
26 lines
634 B
Swift
//
|
|
// ChannelHelper.swift
|
|
// MeshtasticApple
|
|
//
|
|
// 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
|
|
//
|
|
//}
|