Skip to content

Sometimes the value obtained changes #179

@Serakaterina

Description

@Serakaterina
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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions