I was able to obtain the URL in iOS 17+ and lower versions by using the browser.tabs.getSelected method in background.js, and it was successful.
I upgraded to iOS 18 and now this function is returning 'Undefined'. As a result, the Safari Extension feature is broken.
Is this browser.tabs.getSelected no longer available or deprecated as of iOS 18?
As an alternative, browser.tabs.query functions. is a useful substitute for that.