导入 XuXuCheck 工程(iOS 干化学尿液试纸分析 App)
从桌面工程复制而来,作为本仓库的 Xuxucheck/ 子目录。 为控制仓库体积做了两处删减: - 移除 Frameworks/opencv2.xcframework 下的两个 visionOS 切片 (xros-arm64、xros-arm64-simulator,合计约 106 MB),并同步删掉该 xcframework 内 Info.plist 里对应的两条 AvailableLibraries 记录, 只保留 ios-arm64 与 ios-arm64_x86_64-simulator。 - 移除全部 .DS_Store 与 xcuserdata/。 已用 xcodebuild 从本目录完整编译验证:BUILD SUCCEEDED, ProcessXCFramework 以 --platform ios 成功选中框架,产物含 3699 个 cv:: 符号 (OpenCV 确实链入),嵌入 framework 3 个,与移除无用 pod 之后的状态一致。 仓库约 206 MB,其中 OpenCV 203 MB、其余源码与依赖约 3 MB。
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// Globe.swift
|
||||
// XuXuCheck
|
||||
//
|
||||
// Created by henseycai on 2025/6/17.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
import CryptoKit
|
||||
|
||||
let channel="iOS"
|
||||
|
||||
var userid = 0
|
||||
|
||||
func getSign(time: Int) -> String{
|
||||
|
||||
let mm = "urinalysis" + String(time)
|
||||
let m = mm.md5
|
||||
var startIndex = m.index(m.startIndex, offsetBy: 12)
|
||||
var endIndex = m.endIndex
|
||||
let first = m[startIndex..<endIndex].dropLast(2)
|
||||
|
||||
let nn = channel + String(time)
|
||||
let n = nn.md5
|
||||
startIndex = n.index(n.startIndex, offsetBy: 12)
|
||||
endIndex = n.endIndex
|
||||
let last = n[startIndex..<endIndex].dropLast(6)
|
||||
|
||||
return first.appending(last)
|
||||
}
|
||||
|
||||
func getMessage(number: String) -> String {
|
||||
var safeKey = String(number.reversed())
|
||||
|
||||
safeKey = safeKey.replacingOccurrences(of: "3", with: "A")
|
||||
safeKey = safeKey.replacingOccurrences(of: "7", with: "B")
|
||||
safeKey = safeKey.replacingOccurrences(of: "2", with: "C")
|
||||
safeKey = safeKey.replacingOccurrences(of: "0", with: "D")
|
||||
safeKey = safeKey.replacingOccurrences(of: "6", with: "E")
|
||||
safeKey = safeKey.replacingOccurrences(of: "1", with: "F")
|
||||
safeKey = safeKey.replacingOccurrences(of: "9", with: "G")
|
||||
safeKey = safeKey.replacingOccurrences(of: "8", with: "H")
|
||||
safeKey = safeKey.replacingOccurrences(of: "4", with: "I")
|
||||
safeKey = safeKey.replacingOccurrences(of: "5", with: "J")
|
||||
|
||||
// return getMD5(safeKey)
|
||||
if let data = safeKey.data(using: .utf8) {
|
||||
let digest = Insecure.MD5.hash(data: data)
|
||||
return digest.map { String(format: "%02hhx", $0) }.joined()
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func getUserId() -> Int{
|
||||
if(userid == 0) {
|
||||
return 0
|
||||
}
|
||||
return userid * 2 + 8888;
|
||||
}
|
||||
|
||||
let systemName = UIDevice.current.systemName
|
||||
let systemModel = UIDevice.current.model
|
||||
let brandName = UIDevice.current.name
|
||||
let systemVersion = UIDevice.current.systemVersion
|
||||
|
||||
func GetGeneralRequestParams() -> String {
|
||||
|
||||
|
||||
if(Storage.shared.isLogin == false){
|
||||
return "?channle=" + channel + "&platform=1&usertoken=" + Storage.shared.usertoken + "&language=" + Locale.current.identifier + "®ion=" + TimeZone.autoupdatingCurrent.identifier
|
||||
}
|
||||
|
||||
let memberid = String(Storage.shared.member_id)
|
||||
return "?channle=" + channel + "&platform=1&usertoken=" + Storage.shared.usertoken + "&language=" + Locale.current.identifier + "®ion=" + TimeZone.autoupdatingCurrent.identifier + "&member_id=" + memberid
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user