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.
Asked
Active
Viewed 942 times
0
-
Why don't you think that all http or https URLs will be opened in Safari? They will be except for the few documented exceptions. – rmaddy May 02 '14 at 04:16
-
it depends on the URL Scheme – Sunny Shah May 02 '14 at 04:21
1 Answers
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
-
-
1Safari is always the default browser in iOS. Are you aware of any way to change that? – rmaddy May 02 '14 at 04:30
-
-
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
-
-