I am using the QR Reader App to scan the QR Code with the link inside(for example: http://example.com)
Then example.com will be open in QR Reader in-app browser (I don't know what is it).
In my website, I want to have a button called "Open In Default Browser" (Safari or Chrome), and touch this button to launch example.com in my default browser on phone (not in-app browser).
- Any suggestion? Many thanks!
iOS - How to open the links in the default browser (Safari or Chrome) instead of the in-app browser?
Asked
Active
Viewed 641 times
2

Toai
- 139
- 1
- 4
1 Answers
0
NSString *apikey = @"your url";
NSURL *url = [NSURL URLWithString:apikey];
[[UIApplication sharedApplication] openURL:url];

Bijender Singh Shekhawat
- 3,934
- 2
- 30
- 36
-
Is objective C still an acceptable response to iOS questions? – Connor Jun 22 '17 at 17:30
-
There's no swift or objective-c language tag. So why not? – Mozahler Jun 22 '17 at 18:36
-
Sorry guys. I means not Objective C or Swift. I am asking the way to detect in webapp. Any Javascript or HTML5 script? – Toai Jun 23 '17 at 17:01