//
//  getIphone.swift
//  playbtest
//
//  Created by 忆海16 on 2024/12/31.
//

import Foundation
import UIKit

class getIpne {
    static var shard = getIpne()
    private init() {}

    func getIPhoneModel() -> String {
        var systemInfo = utsname()
        uname(&systemInfo)

        let machineMirror = Mirror(reflecting: systemInfo.machine)
        let identifier = machineMirror.children.reduce("") { identifier, element in
            guard let value = element.value as? Int8, value != 0 else { return identifier }
            return identifier + String(UnicodeScalar(UInt8(value)))
        }
        return identifier

    }

}
