Sometimes PhoneGap opens web pages in Safari, sometimes it opens them in its UIWebView, what controls this?
Sometimes PhoneGap opens web pages in Safari, sometimes it opens them in its UIWebView,
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From Does phoneGap support normal web?:
https://github.com/callback/callback-ios/blob/master/PhoneGapLib/Classes/PhoneGapDelegate.m#L669 reveals that:
navigationType == UIWebViewNavigationTypeOther && mainDocument != nilthen it does open Safari.Elaborating on 4:
window.location.href assignment, orwindow.open(...))mainDocument != nilsignifies that the link is not from an iFrame? and/or doesn’t have a target?So basically, I think that only link clicks open in the UIWebView (unless they’re gap:// or file:// links, or that policy is set.)