-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af04ded
commit c512376
Showing
19 changed files
with
294 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// API+UDID.swift | ||
// appdb | ||
// | ||
// Created by stev3fvcks on 23.08.23. | ||
// Copyright © 2023 stev3fvcks. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Alamofire | ||
import SwiftyJSON | ||
|
||
extension API { | ||
|
||
static func getUDID(success: @escaping (String) -> Void, fail: @escaping (String) -> Void) { | ||
|
||
// Get UDID from managed configuration | ||
guard let deviceUdid = UserDefaults.standard.dictionary(forKey: "com.apple.configuration.managed")?["dbservicesUDID"] as? String else { | ||
AF.request(Global.signingCertsUdidApi + "<=\(Preferences.linkToken)", parameters: ["client": "appdb unofficial client"], headers: headers) | ||
.responseJSON { response in | ||
switch response.result { | ||
case .success(let value): | ||
let json = JSON(value) | ||
|
||
if !json["success"].boolValue { | ||
fail("Invalid device link") | ||
} else { | ||
let email = json["data"]["email"].stringValue | ||
let udid = json["data"]["udid"].stringValue | ||
Preferences.set(.email, to: email) | ||
Preferences.set(.udid, to: udid) | ||
|
||
// Update link code | ||
API.getLinkCode(success: { | ||
success(udid) | ||
}, fail: { error in | ||
fail(error) | ||
}) | ||
} | ||
case .failure(let error): | ||
fail(error.localizedDescription) | ||
} | ||
} | ||
return | ||
} | ||
success(deviceUdid) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Info.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "Info 1.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "Info 2.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,9 @@ enum Global { | |
|
||
static let githubSite: String = "https://github.com/n3d1117/appdb" | ||
static let donateSite: String = "https://www.buymeacoffee.com/ne_do" | ||
static let signingCertsEmbedUrl: String = "https://api.signingcerts.com/v1/products/?embed=html" | ||
static let signingCertsUdidApi: String = "https://api.signingcerts.com/v1/appdb-udid/" | ||
static let signingCertsBlogArticle: String = "https://signingcerts.com/blog/apple-signing-certificates-what-they-are-and-how-use-them" | ||
// static let email: String = "[email protected]" | ||
static let email: String = "[email protected]" | ||
static let telegram: String = "https://t.me/stev3fvcks" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.