AppleScript on Xcode (14.2)
Is there any way to make a AppleScript only app using Xcode 14.2.
My AppleScript only I mean use it to handle both the function and UI.
Here is an example AppleScript that I hope I can package into an Xcode project and release as an app.
set userEmail to ""
display dialog "Please enter your email address:" default answer "" buttons {"Cancel", "OK"} default button 2
set userEmail to text returned of the result
set chosenFile to choose file with prompt "Please select a file:"
set fileAddress to POSIX path of chosenFile
set AppleScript's text item delimiters to "/"
set fileComponents to text items of fileAddress
set parentFolderComponents to items 1 through -2 of fileComponents
set parentAddress to (parentFolderComponents as text) & "/"
tell application "Terminal"
activate
delay 2
do script "cd " & quoted form of parentAddress & "; gpg --local-user " & quoted form of userEmail & " --clearsign " & quoted form of fileAddress & "; gpg --local-user " & quoted form of userEmail & " --detach-sign " & quoted form of fileAddress & "; exit"
end tell
Thank you.
MacBook Pro 13″, macOS 12.6