1

The team ID is the prefix for example in "ABCDEF12345.com.facebook.app", ABCDEF12345 is the team ID. I can get "com.facebook.app", but how to get the team ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579

2 Answers2

2

jtool can help you with this.

Using jtool --sig -vv {your macho file} command to get team id of a mach-o file.

  • Note for beginners like me: First unzip the .ipa file then your mach-o file is `Payload/.app/` with both identical. The output will contain something like `Team ID: N398F3HDYP (0x77)`. For me it then fails with `Segmentation fault` but I have what I need. – Nicolas Raoul Jan 27 '23 at 02:58
1

Try this

+ (NSString *)bundleSeedID {
    NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:
                           (__bridge NSString *)kSecClassGenericPassword, (__bridge NSString *)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 NSString *)kSecAttrAccessGroup];
    NSArray *components = [accessGroup componentsSeparatedByString:@"."];
    NSString *bundleSeedID = [[components objectEnumerator] nextObject];
    CFRelease(result);
    return bundleSeedID;
}

https://stackoverflow.com/a/11841898/3901620

Community
  • 1
  • 1
KKRocks
  • 8,222
  • 1
  • 18
  • 84