简体   繁体   中英

iOS - How to open the links in the default browser (Safari or Chrome) instead of the in-app browser?

  • 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!
NSString *apikey = @"your url";
NSURL *url = [NSURL URLWithString:apikey];
[[UIApplication sharedApplication] openURL:url];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM