Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add sbbundleids

  • Loading branch information...
commit 0ac8955360a1ac708ea0d85c4a5ce9d487ac33c4 1 parent d5f5d01
@comex authored
Showing with 16 additions and 1 deletion.
  1. +1 −1  Makefile
  2. +15 −0 sbbundleids.c
View
2  Makefile
@@ -1,4 +1,4 @@
-BINS := sblaunch sburlschemes sbopenurl
+BINS := sblaunch sburlschemes sbopenurl sbbundleids
all: $(BINS)
%: %.c ent.plist
igcc -o $@ $< -std=gnu99 -framework CoreFoundation -framework SpringBoardServices
View
15 sbbundleids.c
@@ -0,0 +1,15 @@
+#include <CoreFoundation/CoreFoundation.h>
+#include <stdio.h>
+#include <stdbool.h>
+
+CFArrayRef SBSCopyApplicationDisplayIdentifiers(bool onlyActive, bool debuggable);
+
+int main() {
+ char buf[1024];
+ CFArrayRef ary = SBSCopyApplicationDisplayIdentifiers(false, false);
+ for(CFIndex i = 0; i < CFArrayGetCount(ary); i++) {
+ CFStringGetCString(CFArrayGetValueAtIndex(ary, i),buf, sizeof(buf), kCFStringEncodingUTF8);
+ printf("%s\n", buf);
+ }
+ return 0;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.