persistent properties

In AS Studio this is impossible to do: properties lose their values after quitting the app.
Is there any keyword making it possible in ASObjC? I fear not…

Thank you

You can’t make persistent properties as such, that’s what you use NSUserDefaults for – this is a place where your app can store values of various sorts.

Ric

I already use user defaults in AS Studio, so I can use them in ASObjC too but I think AS properties are much more comfortable… :slight_smile:

They’re certainly simpler. But they have drawbacks because they involve changing the code, which means they won’t work with things like code-signing. I’m a bit surprised they haven’t been eliminated already in the name of security…

I’m really keen in security… What you say is interesting, what do you mean exactly about the code-signing issues with AS properties?

Code-signing is pointless if the contents of the app change in any way after signing. It’s also not very secure to have the value of variables stored in an app after every run.

Truth to be told properties can be loaded from a script, separating the executable from them and solving the code signing issues. Also I can’t imagine how can a plist be safer than an script: if we need to encrypt the data in the plist it’s possible to do the same thing in the script, isn’t it? Maybe I’m wrong…

The problem is that script properties involve modifying the executable.

…are you saying that the executable’s md5 changes from run to run even if properties are not persistent? I didn’t know that…

No.