Saving license files
Clark Cox
clarkcox3 at gmail.com
Thu Dec 20 14:06:29 PST 2007
On Dec 19, 2007 10:25 PM, Chad Armstrong <edenwaith at mac.com> wrote:
> Any suggestions on what would be a good method on saving license/
> registration info? I'm leaning towards saving a license file in /
> Library/Application Support/MyProduct/. Can anyone (including
> Standard users) save to that location, or should there be a back-up
> method that should just save a copy to their Home ~/Library/
> Application Support/MyProduct/, just in case?
Everyone can *read* /Library, but only admin users can *write* there.
My recommendation:
1) Give the user the choice of "Register for all users on this Mac"
and "Register for me only"
2) If they choose "for all users", then save the registration under
"/Library" (asking for admin credentials if required), and if not,
save the information under "~/Library".
3) Then, when your program looks for the saved registration
information, just use the standard search paths provided by
NSSearchPathForDirectoriesInDomains, and use the first one
encountered.
> Granted, I imagine that a lot of computers have just one user, but in
> some cases (say, a family computer where each person has their own
> account), there might be multiple users, and each person might want to
> use a particular application, but it can get pretty annoying after
> awhile to have to register the application for each and every user.
In this situation, an admin user (Mom, Dad, a Lab administrator, etc.)
would register it once, choosing to register it for all users, and
nobody else will ever be asked for registration information.
--
Clark S. Cox III
clarkcox3 at gmail.com
More information about the MacOSX-dev
mailing list