mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
AltServer adds its own server ID to AltStore’s Info.plist when resigning. This allows AltStore to prefer the server it was installed with.
30 lines
527 B
Swift
30 lines
527 B
Swift
//
|
|
// UserDefaults+AltServer.swift
|
|
// AltServer
|
|
//
|
|
// Created by Riley Testut on 7/31/19.
|
|
// Copyright © 2019 Riley Testut. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension UserDefaults
|
|
{
|
|
var serverID: String? {
|
|
get {
|
|
return self.string(forKey: "serverID")
|
|
}
|
|
set {
|
|
self.set(newValue, forKey: "serverID")
|
|
}
|
|
}
|
|
|
|
func registerDefaults()
|
|
{
|
|
if self.serverID == nil
|
|
{
|
|
self.serverID = UUID().uuidString
|
|
}
|
|
}
|
|
}
|