diff options
Diffstat (limited to 'uiopen.mm')
-rw-r--r-- | uiopen.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/uiopen.mm b/uiopen.mm new file mode 100644 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; +} |