I need to create a form window in my application where the user can access WhatsApp web.
I used TTMSFNCWebBrowser which on Windows works perfectly, however, on macOS when accessing the page “https://web.whatsapp.com/” WhatsApp displays the message that it only works on Safari 10 or higher (on my Mac the version is installed 14.0.1).
Does anyone have any suggestions to resolve this?
I already tried to install Chrome and leave it as the default browser but it didn't work.
uses
Macapi.WebKit;
procedure TForm1.FormCreate(Sender: TObject);
var
w: WKWebView;
begin
w := TWKWebView.Wrap(TMSFNCWebBrowser1.NativeBrowser);
if Assigned(w) then
w.setCustomUserAgent(NSStrEx('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17'));
end;
Please note that there might be additional issue rising when using web.whatsapp.com on an embedded browser.