Files
5d4f42cc65 feat(mobile): iOS improve push notification display when app is in background (#5951)
* feat(mobile): display proper push notification on ios when app in background

* fix(mobile): add a postinstall step and remove dist folder

* Update expo-plugins/notification-service-ios/README.md

Co-authored-by: Usame Algan <[email protected]>

---------

Co-authored-by: Usame Algan <[email protected]>
2025-06-05 08:15:23 +02:00

46 lines
982 B
Swift

//
// DataString.swift
// Multisig
//
// Created by Dmitry Bespalov on 16.06.20.
// Copyright © 2020 Gnosis Ltd. All rights reserved.
//
import Foundation
struct DataString: Hashable, Codable {
let data: Data
init(_ data: Data) {
self.data = data
}
init(hex: String) {
self.data = Data(hex: hex)
}
init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
let string = try container.decode(String.self)
data = Data(hex: string)
}
func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
try container.encode(data.toHexStringWithPrefix())
}
}
extension DataString: ExpressibleByStringLiteral {
init(stringLiteral value: StringLiteralType) {
self.init(Data(ethHex: value))
}
}
extension DataString: CustomStringConvertible {
var description: String {
data.toHexStringWithPrefix()
}
}