mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-14 09:13:25 +01:00
[AltStoreCore] Refactors core AltStore logic into AltStoreCore framework
AltStoreCore will contain all shared AltStore code between AltStore and any app extensions. Initially, it includes all AltStore model logic.
This commit is contained in:
26
AltStoreCore/Model/SecureValueTransformer.swift
Normal file
26
AltStoreCore/Model/SecureValueTransformer.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// SecureValueTransformer.swift
|
||||
// AltStore
|
||||
//
|
||||
// Created by Riley Testut on 8/18/20.
|
||||
// Copyright © 2020 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objc(ALTSecureValueTransformer)
|
||||
public final class SecureValueTransformer: NSSecureUnarchiveFromDataTransformer
|
||||
{
|
||||
public static let name = NSValueTransformerName(rawValue: "ALTSecureValueTransformer")
|
||||
|
||||
public override static var allowedTopLevelClasses: [AnyClass] {
|
||||
let allowedClasses = super.allowedTopLevelClasses + [NSError.self]
|
||||
return allowedClasses
|
||||
}
|
||||
|
||||
public static func register()
|
||||
{
|
||||
let transformer = SecureValueTransformer()
|
||||
ValueTransformer.setValueTransformer(transformer, forName: name)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user