iOS Facebook App browser - force link to open in Safari

前端 未结 2 672
梦毁少年i
梦毁少年i 2020-12-19 03:04

The Facebook App has it\'s own browser (using the UIWebView for iOS apps) but it has a few limitations. We need certain links on our site to be sure to be viewed with Safari

2条回答
  •  鱼传尺愫
    2020-12-19 03:37

    well iOS uses something called an URL Scheme so you might be able to try to use that. It works with native code...

    NSString *stringURL = @"http://fakewebsite.example.com/";
    NSURL *url = [NSURL URLWithString:stringURL];
    [[UIApplication sharedApplication] openURL:url];
    

    not sure if it is possible to do something similar in javascript

提交回复
热议问题