Game Development Community

How do I create a weblink that wil open in Safari?

by Ashwin · in iTorque 2D · 05/19/2009 (5:18 am) · 3 replies

I want to have a button in my game that will go to my website in safari.
But how do I do that ? I can't seem to find the necessary information.

Yours truly,

Ashwin

#1
05/19/2009 (11:37 am)
I have not had the chance to test it, however it looks like if you were to build a function around this line of Objective-C, it should do the job for you:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.google.co.uk"]];
#2
05/19/2009 (11:48 am)
the script call gotowebpage("http://www.google.com"); should work - however some obj-c code needed to be added to 1.1. I am unsure if this has been fixed in 1.2
#3
05/20/2009 (2:36 am)
thanks for the tips

it seems that gotowebpage(); works without adding additional obj-c code in 1.2