Reputation: 29
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 ?
Upvotes: 1
Views: 1398
Reputation: 445
jtool can help you with this.
Using jtool --sig -vv {your macho file}
command to get team id of a mach-o file.
Upvotes: 2
Reputation: 8322
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
Upvotes: 1