Any idea how to launch an instance of Safari from an Iphone or Ipad application? But the case its that I would like to manipulate some aspects of the Safari window, for example I would like to launch it in Kiosk mode, without the addres bar.
I found something like openUrl but I am not sure if it is the best way and I can customize the windows properties etc...
Whether you're learning web development and want to host your own HTML files on your iPhone, or whether you just want to play around with a server without being restricted to using a laptop or a computer to install MAMP, your iPhone can do it for you.
Go to Settings and scroll down until you find the browser app or email app. Tap the app, then tap Default Browser App or Default Mail App.
Do the same
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.google.com"]];
//Swift
UIApplication.sharedApplication().openURL(NSURL.init(string: "https://www.google.com")!)
SFSafariViewController, An object that provides a standard interface for browsing the web.
check this
From iOS 10.0 this is deprecated,
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.google.com"]];
You need to use this instead to get the same old behavior,
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.google.com"] options:[NSDictionary dictionary] completionHandler:nil];
openURL
is the only (public) way to launch an instance of Safari, or of any other application.
Each iOS app is sandboxed,meaning, it cannot interact with other apps. The only (if I'm not mistaken) way to communicate outside sandbox with system and other apps is trough [UIApplication sharedApplication].
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With