Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes the value obtained changes #179

Open
Serakaterina opened this issue Jan 23, 2024 · 0 comments
Open

Sometimes the value obtained changes #179

Serakaterina opened this issue Jan 23, 2024 · 0 comments

Comments

@Serakaterina
Copy link

private static let keychain = KeychainSwift()

private static let KWNETWORKUUIDKEY = "kw_network_uuid_key"

static func idfv() -> String {
    semaphore.wait()
    var result = keychain.get(KWNETWORKUUIDKEY)
    var log = ""
    if result == nil {
        let temp = UIDevice.current.identifierForVendor?.uuidString
        result = temp
        if result != nil {
            let saveRes = keychain.set(result!, forKey: KWNETWORKUUIDKEY)
        }
    }
    if result == nil || result!.isEmpty {
        exit(0)
    }
    semaphore.signal()
    return result!
}

The value obtained through the “get value for key” method will change. Can anyone give me an answer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant