summaryrefslogtreecommitdiff
path: root/uiopen.mm
blob: ab4e2fe2aa03c68f71b1dab34b9408506b9b959a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
}