Skip to content

Commit 8878d70

Browse files
authored
Merge pull request #5 from stossy11/main
ENHANCEMENT: Replace AltSign with StosSign
2 parents e4422df + a06d8df commit 8878d70

File tree

10 files changed

+153
-72
lines changed

10 files changed

+153
-72
lines changed

Entitlement.xcodeproj/project.pbxproj

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,11 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
17D124792D85856000796C1D /* OpenSSL.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17D124782D85856000796C1D /* OpenSSL.xcframework */; };
11-
17D1247A2D85856000796C1D /* OpenSSL.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 17D124782D85856000796C1D /* OpenSSL.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12-
17EE68AA2D84892600B77523 /* AltSign-Static in Frameworks */ = {isa = PBXBuildFile; productRef = 17EE68A92D84892600B77523 /* AltSign-Static */; };
1310
17EE68B02D848EA100B77523 /* Starscream in Frameworks */ = {isa = PBXBuildFile; productRef = 17EE68AF2D848EA100B77523 /* Starscream */; };
1411
17EE68B32D848EF000B77523 /* KeychainAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 17EE68B22D848EF000B77523 /* KeychainAccess */; };
12+
4EE1A6092D954CE9007D655E /* StosSign in Frameworks */ = {isa = PBXBuildFile; productRef = 4EE1A6082D954CE9007D655E /* StosSign */; };
1513
/* End PBXBuildFile section */
1614

17-
/* Begin PBXCopyFilesBuildPhase section */
18-
17D1247B2D85856000796C1D /* Embed Frameworks */ = {
19-
isa = PBXCopyFilesBuildPhase;
20-
buildActionMask = 2147483647;
21-
dstPath = "";
22-
dstSubfolderSpec = 10;
23-
files = (
24-
17D1247A2D85856000796C1D /* OpenSSL.xcframework in Embed Frameworks */,
25-
);
26-
name = "Embed Frameworks";
27-
runOnlyForDeploymentPostprocessing = 0;
28-
};
29-
/* End PBXCopyFilesBuildPhase section */
30-
3115
/* Begin PBXFileReference section */
3216
173496F02D847E82007994DB /* Entitlement.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Entitlement.app; sourceTree = BUILT_PRODUCTS_DIR; };
3317
17D124782D85856000796C1D /* OpenSSL.xcframework */ = {isa = PBXFileReference; expectedSignature = "AppleDeveloperProgram:67RAULRX93:Marcin Krzyzanowski"; lastKnownFileType = wrapper.xcframework; name = OpenSSL.xcframework; path = OpenSSL/Frameworks/OpenSSL.xcframework; sourceTree = "<group>"; };
@@ -59,9 +43,8 @@
5943
isa = PBXFrameworksBuildPhase;
6044
buildActionMask = 2147483647;
6145
files = (
46+
4EE1A6092D954CE9007D655E /* StosSign in Frameworks */,
6247
17EE68B32D848EF000B77523 /* KeychainAccess in Frameworks */,
63-
17EE68AA2D84892600B77523 /* AltSign-Static in Frameworks */,
64-
17D124792D85856000796C1D /* OpenSSL.xcframework in Frameworks */,
6548
17EE68B02D848EA100B77523 /* Starscream in Frameworks */,
6649
);
6750
runOnlyForDeploymentPostprocessing = 0;
@@ -104,7 +87,6 @@
10487
173496EC2D847E82007994DB /* Sources */,
10588
173496ED2D847E82007994DB /* Frameworks */,
10689
173496EE2D847E82007994DB /* Resources */,
107-
17D1247B2D85856000796C1D /* Embed Frameworks */,
10890
);
10991
buildRules = (
11092
);
@@ -115,9 +97,9 @@
11597
);
11698
name = Entitlement;
11799
packageProductDependencies = (
118-
17EE68A92D84892600B77523 /* AltSign-Static */,
119100
17EE68AF2D848EA100B77523 /* Starscream */,
120101
17EE68B22D848EF000B77523 /* KeychainAccess */,
102+
4EE1A6082D954CE9007D655E /* StosSign */,
121103
);
122104
productName = Entitlement;
123105
productReference = 173496F02D847E82007994DB /* Entitlement.app */;
@@ -148,9 +130,9 @@
148130
mainGroup = 173496E72D847E82007994DB;
149131
minimizedProjectReferenceProxies = 1;
150132
packageReferences = (
151-
17EE68A82D84892600B77523 /* XCRemoteSwiftPackageReference "AltSign" */,
152133
17EE68AE2D848EA100B77523 /* XCRemoteSwiftPackageReference "Starscream" */,
153134
17EE68B12D848EF000B77523 /* XCRemoteSwiftPackageReference "KeychainAccess" */,
135+
4EE1A6072D954CE9007D655E /* XCRemoteSwiftPackageReference "StosSign" */,
154136
);
155137
preferredProjectObjectVersion = 77;
156138
productRefGroup = 173496F12D847E82007994DB /* Products */;
@@ -310,7 +292,7 @@
310292
CODE_SIGN_STYLE = Automatic;
311293
CURRENT_PROJECT_VERSION = 1;
312294
DEVELOPMENT_ASSET_PATHS = "\"Entitlement/Preview Content\"";
313-
DEVELOPMENT_TEAM = 3C3YHUUV75;
295+
DEVELOPMENT_TEAM = 95J8WZ4TN8;
314296
ENABLE_PREVIEWS = YES;
315297
GENERATE_INFOPLIST_FILE = YES;
316298
INFOPLIST_FILE = Entitlement/Info.plist;
@@ -326,7 +308,7 @@
326308
"@executable_path/Frameworks",
327309
);
328310
MARKETING_VERSION = 1.0;
329-
PRODUCT_BUNDLE_IDENTIFIER = com.aigch.Entitlement;
311+
PRODUCT_BUNDLE_IDENTIFIER = com.stos.Entitlement;
330312
PRODUCT_NAME = "$(TARGET_NAME)";
331313
SWIFT_EMIT_LOC_STRINGS = YES;
332314
SWIFT_VERSION = 5.0;
@@ -342,7 +324,7 @@
342324
CODE_SIGN_STYLE = Automatic;
343325
CURRENT_PROJECT_VERSION = 1;
344326
DEVELOPMENT_ASSET_PATHS = "\"Entitlement/Preview Content\"";
345-
DEVELOPMENT_TEAM = 3C3YHUUV75;
327+
DEVELOPMENT_TEAM = 95J8WZ4TN8;
346328
ENABLE_PREVIEWS = YES;
347329
GENERATE_INFOPLIST_FILE = YES;
348330
INFOPLIST_FILE = Entitlement/Info.plist;
@@ -358,7 +340,7 @@
358340
"@executable_path/Frameworks",
359341
);
360342
MARKETING_VERSION = 1.0;
361-
PRODUCT_BUNDLE_IDENTIFIER = com.aigch.Entitlement;
343+
PRODUCT_BUNDLE_IDENTIFIER = com.stos.Entitlement;
362344
PRODUCT_NAME = "$(TARGET_NAME)";
363345
SWIFT_EMIT_LOC_STRINGS = YES;
364346
SWIFT_VERSION = 5.0;
@@ -390,14 +372,6 @@
390372
/* End XCConfigurationList section */
391373

392374
/* Begin XCRemoteSwiftPackageReference section */
393-
17EE68A82D84892600B77523 /* XCRemoteSwiftPackageReference "AltSign" */ = {
394-
isa = XCRemoteSwiftPackageReference;
395-
repositoryURL = "https://github.com/SideStore/AltSign";
396-
requirement = {
397-
kind = revision;
398-
revision = 5c278001ccc69e28b9adfd6659a24faf14cc61b3;
399-
};
400-
};
401375
17EE68AE2D848EA100B77523 /* XCRemoteSwiftPackageReference "Starscream" */ = {
402376
isa = XCRemoteSwiftPackageReference;
403377
repositoryURL = "https://github.com/daltoniam/Starscream";
@@ -414,14 +388,17 @@
414388
kind = branch;
415389
};
416390
};
391+
4EE1A6072D954CE9007D655E /* XCRemoteSwiftPackageReference "StosSign" */ = {
392+
isa = XCRemoteSwiftPackageReference;
393+
repositoryURL = "https://github.com/stossy11/StosSign.git";
394+
requirement = {
395+
kind = revision;
396+
revision = 70a80bdd2b570020e917ec4a6fb79a8cf4ba1100;
397+
};
398+
};
417399
/* End XCRemoteSwiftPackageReference section */
418400

419401
/* Begin XCSwiftPackageProductDependency section */
420-
17EE68A92D84892600B77523 /* AltSign-Static */ = {
421-
isa = XCSwiftPackageProductDependency;
422-
package = 17EE68A82D84892600B77523 /* XCRemoteSwiftPackageReference "AltSign" */;
423-
productName = "AltSign-Static";
424-
};
425402
17EE68AF2D848EA100B77523 /* Starscream */ = {
426403
isa = XCSwiftPackageProductDependency;
427404
package = 17EE68AE2D848EA100B77523 /* XCRemoteSwiftPackageReference "Starscream" */;
@@ -432,6 +409,11 @@
432409
package = 17EE68B12D848EF000B77523 /* XCRemoteSwiftPackageReference "KeychainAccess" */;
433410
productName = KeychainAccess;
434411
};
412+
4EE1A6082D954CE9007D655E /* StosSign */ = {
413+
isa = XCSwiftPackageProductDependency;
414+
package = 4EE1A6072D954CE9007D655E /* XCRemoteSwiftPackageReference "StosSign" */;
415+
productName = StosSign;
416+
};
435417
/* End XCSwiftPackageProductDependency section */
436418
};
437419
rootObject = 173496E82D847E82007994DB /* Project object */;

Entitlement.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 22 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1620"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
9+
<BuildActionEntries>
10+
<BuildActionEntry
11+
buildForTesting = "YES"
12+
buildForRunning = "YES"
13+
buildForProfiling = "YES"
14+
buildForArchiving = "YES"
15+
buildForAnalyzing = "YES">
16+
<BuildableReference
17+
BuildableIdentifier = "primary"
18+
BlueprintIdentifier = "173496EF2D847E82007994DB"
19+
BuildableName = "Entitlement.app"
20+
BlueprintName = "Entitlement"
21+
ReferencedContainer = "container:Entitlement.xcodeproj">
22+
</BuildableReference>
23+
</BuildActionEntry>
24+
</BuildActionEntries>
25+
</BuildAction>
26+
<TestAction
27+
buildConfiguration = "Debug"
28+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
29+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30+
shouldUseLaunchSchemeArgsEnv = "YES"
31+
shouldAutocreateTestPlan = "YES">
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Release"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "173496EF2D847E82007994DB"
48+
BuildableName = "Entitlement.app"
49+
BlueprintName = "Entitlement"
50+
ReferencedContainer = "container:Entitlement.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "173496EF2D847E82007994DB"
65+
BuildableName = "Entitlement.app"
66+
BlueprintName = "Entitlement"
67+
ReferencedContainer = "container:Entitlement.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

Entitlement/AnisetteDataHelper.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import Foundation
1010
import CommonCrypto
1111
import Starscream
1212
import KeychainAccess
13-
14-
import AltSign
13+
import StosSign
1514

1615
final class AnisetteDataHelper: WebSocketDelegate
1716
{
@@ -34,7 +33,7 @@ final class AnisetteDataHelper: WebSocketDelegate
3433
static var shared: AnisetteDataHelper = AnisetteDataHelper()
3534

3635
var loggingFunc: ((String)->Void)?
37-
func getAnisetteData(refresh: Bool = false) async throws -> ALTAnisetteData
36+
func getAnisetteData(refresh: Bool = false) async throws -> AnisetteData
3837
{
3938

4039
if url == nil {
@@ -43,7 +42,7 @@ final class AnisetteDataHelper: WebSocketDelegate
4342

4443
self.printOut("Anisette URL: \(self.url!.absoluteString)")
4544

46-
let ans : ALTAnisetteData
45+
let ans : AnisetteData
4746
if let identifier = Keychain.shared.identifier,
4847
let adiPb = Keychain.shared.adiPb {
4948
ans = try await self.fetchAnisetteV3(identifier, adiPb)
@@ -55,7 +54,7 @@ final class AnisetteDataHelper: WebSocketDelegate
5554

5655
// MARK: - COMMON
5756

58-
func extractAnisetteData(_ data: Data, _ response: HTTPURLResponse?, v3: Bool) async throws -> ALTAnisetteData {
57+
func extractAnisetteData(_ data: Data, _ response: HTTPURLResponse?, v3: Bool) async throws -> AnisetteData {
5958
// make sure this JSON is in the format we expect
6059
// convert data to json
6160
if let json = try JSONSerialization.jsonObject(with: data, options: []) as? [String: String] {
@@ -111,10 +110,13 @@ final class AnisetteDataHelper: WebSocketDelegate
111110

112111
self.printOut("Anisette used: \(formattedJSON)")
113112
self.printOut("Original JSON: \(json)")
114-
if let anisette = ALTAnisetteData(json: formattedJSON) {
113+
do {
114+
let jsonData = try JSONEncoder().encode(formattedJSON)
115+
let anisette = try JSONDecoder().decode(AnisetteData.self, from: jsonData)
116+
115117
self.printOut("Anisette is valid!")
116118
return anisette
117-
} else {
119+
} catch {
118120
self.printOut("Anisette is invalid!!!!")
119121
if v3 {
120122
throw "Invalid anisette (the returned data may not have all the required fields)"
@@ -134,7 +136,7 @@ final class AnisetteDataHelper: WebSocketDelegate
134136

135137
// MARK: - V3: PROVISIONING
136138

137-
func provision() async throws -> ALTAnisetteData {
139+
func provision() async throws -> AnisetteData {
138140
try await fetchClientInfo()
139141
self.printOut("Getting provisioning URLs")
140142
var request = self.buildAppleRequest(url: URL(string: "https://gsa.apple.com/grandslam/GsService2/lookup")!)
@@ -160,7 +162,7 @@ final class AnisetteDataHelper: WebSocketDelegate
160162

161163
}
162164

163-
func startProvisioningSession() async throws -> ALTAnisetteData{
165+
func startProvisioningSession() async throws -> AnisetteData {
164166
let provisioningSessionURL = self.url!.appendingPathComponent("v3").appendingPathComponent("provisioning_session")
165167
var wsRequest = URLRequest(url: provisioningSessionURL)
166168
wsRequest.timeoutInterval = 5
@@ -360,7 +362,7 @@ final class AnisetteDataHelper: WebSocketDelegate
360362

361363
}
362364

363-
func fetchAnisetteV3(_ identifier: String, _ adiPb: String) async throws -> ALTAnisetteData {
365+
func fetchAnisetteV3(_ identifier: String, _ adiPb: String) async throws -> AnisetteData {
364366
try await fetchClientInfo()
365367
self.printOut("Fetching anisette V3")
366368
let url = menuAnisetteURL

Entitlement/AppIDViewModel.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by s s on 2025/3/15.
66
//
77
import SwiftUI
8-
import AltSign
8+
import StosSign
99

1010
class AppIDModel : ObservableObject, Hashable {
1111
static func == (lhs: AppIDModel, rhs: AppIDModel) -> Bool {
@@ -16,11 +16,11 @@ class AppIDModel : ObservableObject, Hashable {
1616
hasher.combine(ObjectIdentifier(self))
1717
}
1818

19-
var appID: ALTAppID
19+
var appID: AppID
2020
@Published var bundleID: String
2121
@Published var result: String = ""
2222

23-
init(appID: ALTAppID) {
23+
init(appID: AppID) {
2424
self.appID = appID
2525
bundleID = appID.bundleIdentifier
2626
}
@@ -74,8 +74,8 @@ class AppIDViewModel : ObservableObject {
7474
throw "Please Login First"
7575
}
7676

77-
let ids = try await withUnsafeThrowingContinuation { (c: UnsafeContinuation<[ALTAppID], Error>) in
78-
ALTAppleAPI.shared.fetchAppIDs(for: team, session: session) { (appIDs, error) in
77+
let ids = try await withUnsafeThrowingContinuation { (c: UnsafeContinuation<[AppID], Error>) in
78+
AppleAPI().fetchAppIDsForTeam(team: team, session: session) { (appIDs, error) in
7979
if let error = appIDs as? Error {
8080
c.resume(throwing: error)
8181
}

Entitlement/Keychain.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Foundation
1010
import KeychainAccess
1111

12-
import AltSign
12+
import StosSign
1313

1414
@propertyWrapper
1515
public struct KeychainItem<Value>

0 commit comments

Comments
 (0)