I am using NSAppleScript to tell Safari to return URL of all opened tabs as follows:
let script = NSAppleScript.init(source: "tell application \"Safari\" to get URL of every tab of every window")
var errorInfo: NSDictionary?
let eventDescriptor:NSAppleEventDescriptor = (script?.executeAndReturnError(&errorInfo))!
"tell application \"Safari\" to return URL of front document as string"
The result will be an NSDescriptor representing a list of lists of strings. Either you 1. coerce the list to string in AppleScript before returning it, using a suitable text item delimiter upon which you can then split the string into a list of strings in Swift (cheat), 2. use a couple of nested loops to unpack the list descriptors yourself (tedious), or 3. ditch
NSAppleScript and use the AppleScript-ObjC bridge instead (a little fiddly to set up, but by far the simplest and most capable to use).