mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-20 02:05:39 -04:00
Initial commit
This commit is contained in:
parent
9197011230
commit
2ed311a818
184 changed files with 8052 additions and 2 deletions
34
Shared/HelperToolInfoPropertyList.swift
Normal file
34
Shared/HelperToolInfoPropertyList.swift
Normal file
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// HelperToolInfoPropertyList.swift
|
||||
// Mist
|
||||
//
|
||||
// Created by Nindi Gill on 21/6/2022.
|
||||
//
|
||||
|
||||
import EmbeddedPropertyList
|
||||
import Foundation
|
||||
|
||||
struct HelperToolInfoPropertyList: Decodable, Equatable {
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case buildHash = "BuildHash"
|
||||
case bundleIdentifier = "CFBundleIdentifier"
|
||||
case version = "CFBundleVersion"
|
||||
case authorizedClients = "SMAuthorizedClients"
|
||||
}
|
||||
|
||||
let buildHash: String
|
||||
let bundleIdentifier: String
|
||||
let version: BundleVersion
|
||||
let authorizedClients: [String]
|
||||
|
||||
init() throws {
|
||||
let data: Data = try EmbeddedPropertyListReader.info.readInternal()
|
||||
self = try PropertyListDecoder().decode(HelperToolInfoPropertyList.self, from: data)
|
||||
}
|
||||
|
||||
init(from url: URL) throws {
|
||||
let data: Data = try EmbeddedPropertyListReader.info.readExternal(from: url)
|
||||
self = try PropertyListDecoder().decode(HelperToolInfoPropertyList.self, from: data)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue