]> git.saurik.com Git - uikittools.git/blobdiff - uiopen.mm
UIKit Tools is not part of Telesphoreo.
[uikittools.git] / uiopen.mm
diff --git a/uiopen.mm b/uiopen.mm
new file mode 100644 (file)
index 0000000..ab4e2fe
--- /dev/null
+++ b/uiopen.mm
@@ -0,0 +1,14 @@
+#import <UIKit/UIKit.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+    if (argc != 2)
+        fprintf(stderr, "usage: %s <url>\n", argv[0]);
+    else {
+        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+        [[UIApplication alloc] openURL:[NSURL URLWithString:[NSString stringWithUTF8String:argv[1]]]];
+        [pool release];
+    }
+
+    return 0;
+}