IPhone Software Search

Is there a way to find the application software identifier in the iPhone software application? Or even just get the entire Application Identifier string?

I see you can find it by looking at the file "embedded.mobileprovision", but is there an easier way? (And I don't think this works if you work in a simulator)

EDIT: Sorry, I mean the PREFIX identifier (10 characters). I realized that I really do not need this, because the rest of the identifier, in any case, will be unique.

+3
source share
3 answers

Info.plist , St3fan, Info.plist. :

[[NSBundle mainBundle] bundleIdentifier]
+10

Bundle, (.. kSecAttrAccessGroup) KeyChain. KeyChain , . KeyChain, , ".". () Bundle.

+ (NSString *)bundleSeedID {
    NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:
                           kSecClassGenericPassword, kSecClass,
                           @"bundleSeedID", kSecAttrAccount,
                           @"", kSecAttrService,
                           (id)kCFBooleanTrue, kSecReturnAttributes,
                           nil];
    CFDictionaryRef result = nil;
    OSStatus status = SecItemCopyMatching((CFDictionaryRef)query, (CFTypeRef *)&result);
    if (status == errSecItemNotFound)
        status = SecItemAdd((CFDictionaryRef)query, (CFTypeRef *)&result);
    if (status != errSecSuccess)
        return nil;
    NSString *accessGroup = [(NSDictionary *)result objectForKey:kSecAttrAccessGroup];
    NSArray *components = [accessGroup componentsSeparatedByString:@"."];
    NSString *bundleSeedID = [[components objectEnumerator] nextObject];
    CFRelease(result);
    return bundleSeedID;
}
+4

, ? .

NSString* appID = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
0

Source: https://habr.com/ru/post/1734812/


All Articles