1

I'm looking for a way to change how my app handles URL scheme in FMX when a user clicks a URL. Scenario, user clicks a Wikipedia link inside app and the safari in IOS opens up the default app if present Wikipedia to view the link instead of just opening the link in the default browser as a normal link.

Link below shows apps can register to have URLs open to their apps https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app

procedure SetUserAgent(const ABrowser: TWebBrowser);
var
  LWebView: WKWebView;
begin

  if Supports(ABrowser, WKWebView, LWebView) then  
    
      LWebView.configuration.setURLSchemeHandler(nil,nil);

end;
Ken White
  • 123,280
  • 14
  • 225
  • 444
Rob
  • 31
  • 4
  • For the first part of your question, you might like to look [at this](https://github.com/DelphiWorlds/Kastri/tree/master/Demos/UniversalLinks). The second part of your question appears to be for when *your* app actually contains the browser. – Dave Nottage Sep 20 '22 at 11:43
  • Thanks so much for the insights, all good – Rob Sep 24 '22 at 21:11

0 Answers0