0

I am trying to open a html file from my iPhone/iPad app particularly in Safari. I use openURL method of UIApplication after checking canOpenURL. I doubt if the link will always be opened in Safari. Even in jailbreak iPhones and iPads. If not can I use openFile: withApplication to achieve the same? I referred the stackOverFlow question Open url in safari through cocoa app . Is it possible to do without do any scripting bridge mentioned there? Help me guys. Thanks in advance.

Community
  • 1
  • 1
aparna
  • 353
  • 2
  • 3
  • 13

1 Answers1

0

openURL method will respond on the URL schemes. if it is http, https then it will open in safari.

differnert URL schemes http, https, tel, facetime, and mailto schemes.

Sunny Shah
  • 12,990
  • 9
  • 50
  • 86
  • Even if safari is not the default browser – aparna May 02 '14 at 04:25
  • 1
    Safari is always the default browser in iOS. Are you aware of any way to change that? – rmaddy May 02 '14 at 04:30
  • @aparna do you have any case that URL is not open in the safari? – Sunny Shah May 02 '14 at 04:37
  • No. But if we try to jailBreak the iOS, then its possible to change default browser no. Even in that case, I need to open URL in safari. Since I am not the only person who is going to use the app, I cannot make sure that others don't do such jailbreaking process and change default browser. Though the probability of such users are very very low, I just wanted to know if there is some general solution. – aparna May 02 '14 at 06:49
  • @SunnyShah as of now I dint find any such cases. – aparna May 02 '14 at 06:52
  • @aparna Ok i will try to find out is there is any case. – Sunny Shah May 02 '14 at 06:59