Browser like object for Swift

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Browser like object for Swift



I am creating an app for a website. I want to run a browser or a browser like object in the background and fetch data from the website. This website requires login!!! In Python there are libraries like mechanize and selenium which I can fill forms, get html, and find links very easily. However, I did not find any libraries or classes in swift that can do this. I have tried URLSession, but it cannot fill forms to login and get html dynamically. I also tried WKWebView and SafariServices. None of them seems to fulfill my goals. Are there any browser-like classes like mechanize and selenium in Swift? And I am not sure whether URLSession, WKWebView, and SafariServices can fill forms and login a website. Can anyone point me out. Also is using python in this case suitable? Thank you!




1 Answer
1



Use the WebKit, and have your UIViewController conform to WKNavigationDelegate.


WebKit


UIViewController


WKNavigationDelegate



Use the delegate methods to handle navigation requests.


delegate






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS