• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Registration Code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Registration Code


  • Subject: Registration Code
  • From: Ken Victor <email@hidden>
  • Date: Wed, 10 Nov 2004 14:33:40 -0800

Title: Registration Code
i'm looking for a place to store the user's registration code. the following places appear as possiblities:
1) in the resources folder inside my app bundle -- but this requires modifying my app bundle and won't work if my app is on read only media

2) in a file inside ~/library/application support/ - although i'm not too concerned about piracy, this seems a little too obvious and easy for the user to find the file and send to friends

3) the above have led me to consider using NSHTTPCookie and NSHTTPCookieStorage.

is there any reason that i shouldn't use approach 3? or could anyone suggest a better place to store this information?

however... in exploring approach 3, i've run into a problem i don't understand. i have a test app with code that is roughly the following:
create a cookie
save current NSHTTPCookieAcceptPolicy
set NSHTTPCookieAcceptPolicy to NSHTTPCookieAcceptPolicyAlways (if needed)
use: [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie: myCookie];
restore saved NSHTTPCookieAcceptPolicy
this works fine until my test app quits. if i run a different test app that just looks at all the cookies in [NSHTTPCookieStorage sharedHTTPCookieStorage], the cookie i added with my first test app is no longer there. do i need to do something to make my cookie storage persistant? (assuming of course that there are no valid reasons to not use this approach).

thanx,
ken
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Registration Code
      • From: Bob Ippolito <email@hidden>
    • Re: Registration Code
      • From: Deirdre Saoirse Moen <email@hidden>
  • Prev by Date: auto InfoPlist.strings updating
  • Next by Date: Re: Why "Add" button for Cocoa Bindings?
  • Previous by thread: Re: auto InfoPlist.strings updating
  • Next by thread: Re: Registration Code
  • Index(es):
    • Date
    • Thread