In Safari my Sign Up form JavaScript code works fine, but in UIWebView and in WKWebView that form isn't loading.
Here is my Code to review.
import UIKit
import WebKit
class ViewController: UIViewController, WKNavigationDelegate {
@IBOutlet weak var Webview: UIWebView!
var webView: WKWebView!
var websites = ["lampecompany.com", "lampecompany.com"]
override func loadView() {
webView = WKWebView()
webView.navigationDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let url = URL(string: "https://" + websites[0])!
webView.load(URLRequest(url: url) as URLRequest)
webView.allowsBackForwardNavigationGestures = true
}
Main page opens correctly and then Menu -> Apply, on this screen Apply here form doesn't display.
Here are both screenshots attached. Safari and WKWebView.
Any help regarding this that my WKWebView start behaving like Safari and open each and everything correctly as Safari browser does.
When I put my website link here in this WKWebView browser then its working. https://github.com/mbarnig/WKWebView
so why not in my code. I used the same code in my app but in vein.
Thank you in Advance!
Your web page Signup form (iframe) has SSL issue.
In iOS, If you are loading an http url, then you have to add App Transport Security Settings
in your info.plist
file.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
I found the issue in the following way.
Please see your web page console log below.
Error : Failed to load resource: An SSL error has occurred and a secure connection to https://www.lampeplacementservices.com/LampeOptin/LampeOptinReferralForm.html