Skip to content

Instantly share code, notes, and snippets.

View KunalKumarSwift's full-sized avatar
💭
I may be slow to respond.

Kunal Kumar KunalKumarSwift

💭
I may be slow to respond.
View GitHub Profile
import DeviceCheck
import CryptoKit
class AppAttestationService {
private let dcAppAttestService = DCAppAttestService.shared
// Update to your local machine's IP address - don't use localhost since iOS simulator/device
// needs to reach your computer's actual IP
private let serverURL = URL(string: "http://192.168.1.X:3000/verify-attestation")!
func performAttestation() async throws {
{
"public_identifier":"kunalkumar91",
"profile_pic_url":"None",
"background_cover_image_url":"https://media.licdn.com/dms/image/v2/D5616AQFZv7evcAE94A/profile-displaybackgroundimage-shrink_350_1400/profile-displaybackgroundimage-shrink_350_1400/0/1716177983373?e=1737590400&v=beta&t=SmnAGatxJRpbCRbSFhYCp5POxlxRE25CBX5iYWZTq2g",
"first_name":"Kunal",
"last_name":"Kumar",
"full_name":"Kunal Kumar",
"follower_count":1048,
"occupation":"Software Architect at Scotiabank Digital Factory",
"headline":"Software Architect at Scotiabank Digital Factory | Ex-Accenture | Transforming ideas into MVPs 💡📈",
var n = 8
var row = 2 * n - 1
for i in 1...n {
for j in 1...row {
let lowerRange = n-(i-1)
let upperRange = n+(i-1)
if j < lowerRange {
print(" ", terminator: " ")