Saving an applescript variable in Xcode for the next app open.

I’ve built an app with AppleScript in Xcode, and I need to save a string of text that the app will be able to access the next time it opens up.

Right now, I’m saving that info in a .txt file in the “Application Support” support folder, but GateKeeper throws up a warning that my app needs Finder access when it runs. Obviously, I’m new at this! lol

How would I save a string of text in plist or elsewhere in my app so that it can access it the next time it opens?

You can save a text file without involving Finder.

See my post from a while back: https://macscripter.net/viewtopic.php?pid=197781#p197781. It shows you how to use the standard UserDefaults system to store data across runs.