• 得到bundle seed id


    - (NSString *)bundleSeedID {

        NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:

                               (__bridge id)(kSecClassGenericPassword), kSecClass,

                               @"bundleSeedID", kSecAttrAccount,

                               @"", kSecAttrService,

                               (id)kCFBooleanTrue, kSecReturnAttributes,

                               nil];

        CFDictionaryRef result = nil;

        OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);

        if (status == errSecItemNotFound)

            status = SecItemAdd((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);

        if (status != errSecSuccess)

            return nil;

        NSString *accessGroup = [(__bridge NSDictionary *)result objectForKey:(__bridge id)(kSecAttrAccessGroup)];

        NSArray *components = [accessGroup componentsSeparatedByString:@"."];

        NSString *bundleSeedID = [[components objectEnumerator] nextObject];

        CFRelease(result);

        return bundleSeedID;

    }

  • 相关阅读:
    寄存器英文全称
    汇编指令介绍
    汇编指令的基本知识
    第一篇
    Windows下让Git记住用户名密码(https)
    javascript 汉字拼音排序
    KO.js学习笔记(一)
    学javascript突发奇想,只用浏览器就能转换进制
    谨此纪念我的技术成长之路
    委托与事件
  • 原文地址:https://www.cnblogs.com/wudan7/p/4143486.html
Copyright © 2020-2023  润新知