mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-13 16:53:29 +01:00
[AltXPC] Initial version
AltXPC uses the private com.apple.authkit.client.internal entitlement to retrieve anisette data.
This commit is contained in:
31
AltXPC/main.swift
Normal file
31
AltXPC/main.swift
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// main.swift
|
||||
// AltXPC
|
||||
//
|
||||
// Created by Riley Testut on 12/3/20.
|
||||
// Copyright © 2020 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class ServiceDelegate : NSObject, NSXPCListenerDelegate
|
||||
{
|
||||
func listener(_ listener: NSXPCListener, shouldAcceptNewConnection newConnection: NSXPCConnection) -> Bool
|
||||
{
|
||||
newConnection.exportedInterface = NSXPCInterface(with: AltXPCProtocol.self)
|
||||
|
||||
let exportedObject = AltXPC()
|
||||
newConnection.exportedObject = exportedObject
|
||||
newConnection.resume()
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
let serviceDelegate = ServiceDelegate()
|
||||
|
||||
let listener = NSXPCListener.service()
|
||||
listener.delegate = serviceDelegate
|
||||
listener.resume()
|
||||
|
||||
RunLoop.main.run()
|
||||
|
||||
Reference in New Issue
Block a user