Skip to content

Instantly share code, notes, and snippets.

@osvein
Created August 10, 2023 14:00
Show Gist options
  • Save osvein/bcc1b8d1ac5a726535c283ec9731f9a9 to your computer and use it in GitHub Desktop.
Save osvein/bcc1b8d1ac5a726535c283ec9731f9a9 to your computer and use it in GitHub Desktop.
#include <CoreFoundation/CoreFoundation.h>
#include <stdio.h>
#ifndef SPRINGBOARDSERVICES_H_
extern NSString* SBSCopyBundlePathForDisplayIdentifier(NSString* bundleId);
#endif
int main(int argc, char *argv[], char )
{
if (argc < 2)
{
fprintf(stderr, "Usage: %s <bundle 1> [bundle 2] .. [bundle n]", argv[0]);
return 1;
}
for (int i = 1; i < argc; i++)
{
NSString *path = SBSCopyBundlePathForDisplayIdentifier([NSString stringWithUTF8String:argv[i]]);
fprintf(stdout, [path UTF8String]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment