should be the following :
NSURL *url = [NSURL URLWithString:@"http://www.stackoverflow.com"];
if (![[UIApplication sharedApplication] openURL:url]) {
NSLog(@"%@%@",@"Failed to open url:",[url description]);
}
More Related Contents:
- How to detect first time app launch on an iPhone
- WKWebView open links from certain domain in safari
- Open iOS app from browser
- Cordova: sharing browser URL to my iOS app (Clipper ios share extension)
- How to detect Apps first launch in iOS?
- When is the Scan Credit Card option available on iOS8 Safari?
- iOS 7 – is there a way to disable the swipe back and forward functionality in Safari?
- Why Safari shows “No Inspectable Applications” during remote debugging with iOS 6 device?
- Does webKit in iOS 11 (Beta) support WebRTC?
- Loading/Downloading image from URL on Swift
- Symbolicating iPhone App Crash Reports
- Getting and Setting Cursor Position of UITextField and UITextView in Swift
- What is “Constrain to margin” in Storyboard in Xcode 6
- Delete all keys from a NSUserDefaults dictionary iOS
- What’s the difference between all the Selection Segues?
- Use Xcode 8 with iOS 11
- Implement PushKit and test in development behavior
- Posting JSON data using AFNetworking 2.0
- How to add Strings on X Axis in iOS-charts?
- Swift – UIButton with two lines of text
- Can I change app icon programmatically
- CCAvenue iOS kit integration kit
- Duplicate Symbols for Architecture arm64
- UITextView: Disable selection, allow links
- Open UISplitViewController to Master View rather than Detail
- How to get notified of UITableViewCell move start and end?
- How can I get the iOS device CPU architecture in runtime
- MKMapView MKPointAnnotation tap event
- Implementing Fast and Efficient Core Data Import on iOS 5
- iOS Calendar Access Permission Dialog, force it to appear?